Refactor error handling in server read loop

This commit is contained in:
Felix Lange 2025-10-23 07:35:20 +02:00 committed by GitHub
parent 8a1f28c77f
commit d4a159f1a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -813,11 +813,10 @@ func (srv *Server) listenLoop() {
time.Sleep(time.Millisecond * 200) time.Sleep(time.Millisecond * 200)
continue continue
} else if err != nil { } else if err != nil {
slots <- struct{}{} if !errors.Is(err, net.ErrClosed) {
if errors.Is(err, net.ErrClosed) { srv.log.Debug("Read error", "err", err)
return
} }
srv.log.Debug("Read error", "err", err) slots <- struct{}{}
return return
} }
break break