loopTCPIn should not return when one conn error

This commit is contained in:
zak 2022-09-06 21:18:05 +08:00
parent 8f8437a88d
commit 7652dc7b27

View File

@ -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)