more unique error messages

This commit is contained in:
Alex Grintsvayg 2019-02-08 17:28:09 -05:00
parent a98990f573
commit 00feaaf76c
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -93,7 +93,7 @@ func (s *Server) listenAndServe(listener net.Listener) {
if s.closed {
return
}
log.Error(err)
log.Error(errors.Prefix("accepting conn", err))
} else {
s.grp.Add(1)
go func() {
@ -330,7 +330,7 @@ func readNextRequest(conn net.Conn) ([]byte, error) {
chunk, err := buf.ReadBytes('}')
if err != nil {
if err != io.EOF {
log.Errorln("read error:", err)
log.Errorln("readBytes error:", err)
return request, err
}
eof = true