mirror of
https://github.com/SagerNet/sing-quic.git
synced 2025-04-04 12:27:38 +03:00
Fix close message
This commit is contained in:
parent
5138a6acc8
commit
541e66a4a1
2 changed files with 2 additions and 3 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/sagernet/quic-go"
|
||||
|
@ -127,7 +126,7 @@ func (s *Service[U]) loopConnections(listener qtls.Listener) {
|
|||
for {
|
||||
connection, err := listener.Accept(s.ctx)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "server closed") {
|
||||
if E.IsClosedOrCanceled(err) {
|
||||
s.logger.Debug(E.Cause(err, "listener closed"))
|
||||
} else {
|
||||
s.logger.Error(E.Cause(err, "listener closed"))
|
||||
|
|
|
@ -113,7 +113,7 @@ func (s *Service[U]) Start(conn net.PacketConn) error {
|
|||
for {
|
||||
connection, hErr := listener.Accept(s.ctx)
|
||||
if hErr != nil {
|
||||
if strings.Contains(hErr.Error(), "server closed") {
|
||||
if E.IsClosedOrCanceled(hErr) {
|
||||
s.logger.Debug(E.Cause(hErr, "listener closed"))
|
||||
} else {
|
||||
s.logger.Error(E.Cause(hErr, "listener closed"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue