Fix tcp keep alive
This commit is contained in:
@@ -38,8 +38,8 @@ func NewConnection(ctx context.Context, router adapter.Router, errorHandler E.Ha
|
||||
go func() {
|
||||
logger.InfoContext(ctx, "inbound multiplex connection to ", metadata.Destination)
|
||||
hErr := router.RouteConnection(ctx, &ServerConn{ExtendedConn: bufio.NewExtendedConn(stream)}, metadata)
|
||||
stream.Close()
|
||||
if hErr != nil {
|
||||
stream.Close()
|
||||
errorHandler.NewError(ctx, hErr)
|
||||
}
|
||||
}()
|
||||
@@ -54,8 +54,8 @@ func NewConnection(ctx context.Context, router adapter.Router, errorHandler E.Ha
|
||||
packetConn = &ServerPacketAddrConn{ExtendedConn: bufio.NewExtendedConn(stream)}
|
||||
}
|
||||
hErr := router.RoutePacketConnection(ctx, packetConn, metadata)
|
||||
stream.Close()
|
||||
if hErr != nil {
|
||||
stream.Close()
|
||||
errorHandler.NewError(ctx, hErr)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user