This commit is contained in:
Alex Grintsvayg 2018-08-15 11:26:36 -04:00
parent 74cb72f197
commit 4c8eda783f

View file

@ -119,7 +119,7 @@ func (s *Server) handleConn(conn net.Conn) {
err := s.doHandshake(conn) err := s.doHandshake(conn)
if err != nil { if err != nil {
if err == io.EOF || s.quitting() { if errors.Is(err, io.EOF) || s.quitting() {
return return
} }
err := s.doError(conn, err) err := s.doError(conn, err)
@ -132,7 +132,7 @@ func (s *Server) handleConn(conn net.Conn) {
for { for {
err = s.receiveBlob(conn) err = s.receiveBlob(conn)
if err != nil { if err != nil {
if err == io.EOF || s.quitting() { if errors.Is(err, io.EOF) || s.quitting() {
return return
} }
err := s.doError(conn, err) err := s.doError(conn, err)