mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
feat: use goroutines to process connections
This commit is contained in:
@@ -67,7 +67,7 @@ func SetTCPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyMan
|
||||
config: config,
|
||||
}
|
||||
|
||||
handler.Handle(conn)
|
||||
go handler.Handle(conn)
|
||||
})
|
||||
|
||||
s.SetTransportProtocolHandler(tcp.ProtocolNumber, tcpForwarder.HandlePacket)
|
||||
|
||||
@@ -57,7 +57,7 @@ func SetUDPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyMan
|
||||
policyManager: policyManager,
|
||||
config: config,
|
||||
}
|
||||
handler.Handle(conn)
|
||||
go handler.Handle(conn)
|
||||
})
|
||||
s.SetTransportProtocolHandler(gvisor_udp.ProtocolNumber, udpForwarder.HandlePacket)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user