mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-01 10:46:50 +00:00
fix: listener close panic
This commit is contained in:
1 parent
199fb8fd5d
commit
5a21bf3642
3 files changed
+8
-4
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
"runtime/debug"
|
||||
"time"
|
||||
|
||||
N "github.com/metacubex/mihomo/common/net"
|
||||
@@ -63,6 +64,7 @@ func NewListenerForHttps(l net.Listener, httpServer *http.Server, tlsConfig *Con
|
||||
}
|
||||
return c, nil
|
||||
}, func(a any) {
|
||||
log.Errorln("https server panic: %s", a)
|
||||
stack := debug.Stack()
|
||||
log.Errorln("https server panic: %s\n%s", a, stack)
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user