mirror of https://github.com/v2fly/v2ray-core.git
feat: use goroutines to process connections
This commit is contained in:
parent
0a090a073b
commit
c439a12d06
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue