feat: use goroutines to process connections

This commit is contained in:
AkinoKaede
2023-10-22 22:44:35 +01:00
committed by Shelikhoo
parent 0a090a073b
commit c439a12d06
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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