Fix selector not interrupting routed connections

This commit is contained in:
世界
2026-09-08 13:19:30 +08:00
parent 0c041aa7f6
commit 515a73e4ee
+2 -2
View File
@@ -166,7 +166,7 @@ func (s *Selector) NewConnection(ctx context.Context, conn net.Conn, metadata ad
if outboundHandler, isHandler := selected.(adapter.ConnectionHandler); isHandler {
outboundHandler.NewConnection(ctx, conn, metadata, onClose)
} else {
s.connection.NewConnection(ctx, selected, conn, metadata, onClose)
s.connection.NewConnection(ctx, s, conn, metadata, onClose)
}
}
@@ -176,7 +176,7 @@ func (s *Selector) NewPacketConnection(ctx context.Context, conn N.PacketConn, m
if outboundHandler, isHandler := selected.(adapter.PacketConnectionHandler); isHandler {
outboundHandler.NewPacketConnection(ctx, conn, metadata, onClose)
} else {
s.connection.NewPacketConnection(ctx, selected, conn, metadata, onClose)
s.connection.NewPacketConnection(ctx, s, conn, metadata, onClose)
}
}