break out of listen loop on error

This commit is contained in:
Kevin Schoon 2018-02-03 22:25:06 -05:00
parent 2fc414efdd
commit 82d8b7d875
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ func (s *Server) listen() {
for s.running { for s.running {
conn, err := s.listener.Accept() conn, err := s.listener.Accept()
if err != nil { if err != nil {
panic(err) break
} }
buf := make([]byte, 512) buf := make([]byte, 512)
// Ignore any content // Ignore any content