mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: listener close panic
This commit is contained in:
@@ -34,8 +34,8 @@ func (l *handleContextListener) init() {
|
||||
}
|
||||
}
|
||||
}()
|
||||
if c, err := l.handle(l.ctx, c); err == nil {
|
||||
l.conns <- c
|
||||
if conn, err := l.handle(l.ctx, c); err == nil {
|
||||
l.conns <- conn
|
||||
} else {
|
||||
// handle failed, close the underlying connection.
|
||||
_ = c.Close()
|
||||
|
||||
Reference in New Issue
Block a user