fix infinite loop on client disconnected socket

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-07 17:50:39 +12:00
parent 07a57777f7
commit 41139cdd72

View File

@ -101,8 +101,12 @@ func (s *Server) RunWorker() {
if err == io.EOF { if err == io.EOF {
break // abandon thread break // abandon thread
} }
// If this was a /timeout/, send a KA and continue.
// But otherwise, it was a real error (e.g. unexpected disconnect)
s.verboseln(err.Error()) s.verboseln(err.Error())
continue break // abandon
} }
rawLines := buf[:ln] rawLines := buf[:ln]