mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-26 17:46:34 +03:00
Do not log 'use of closed network connection' error when closing listener in Server.Serve*
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -320,7 +321,7 @@ func acceptConn(s *Server, ln net.Listener, lastPerIPErrorTime *time.Time) (net.
|
||||
time.Sleep(time.Second)
|
||||
continue
|
||||
}
|
||||
if err != io.EOF {
|
||||
if err != io.EOF && !strings.Contains(err.Error(), "use of closed network connection") {
|
||||
s.logger().Printf("Permanent error when accepting new connections: %s", err)
|
||||
}
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user