mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 11:44:13 +08:00
loopTCPIn should not return when one conn error
This commit is contained in:
parent
8f8437a88d
commit
7652dc7b27
@ -40,11 +40,12 @@ func (a *myInboundAdapter) loopTCPIn() {
|
||||
for {
|
||||
conn, err := tcpListener.Accept()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
a.logger.ErrorContext(a.ctx, err)
|
||||
} else {
|
||||
go a.injectTCP(conn, adapter.InboundContext{})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *myInboundAdapter) injectTCP(conn net.Conn, metadata adapter.InboundContext) {
|
||||
ctx := log.ContextWithNewID(a.ctx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user