From 1b80a1a85a63eced8f6a09ba10d86d2e85743130 Mon Sep 17 00:00:00 2001 From: V2Ray Date: Wed, 14 Oct 2015 09:56:04 +0200 Subject: [PATCH] Handle multiple UDP packets in socks. --- proxy/socks/udp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/socks/udp.go b/proxy/socks/udp.go index 78178463f..76513b685 100644 --- a/proxy/socks/udp.go +++ b/proxy/socks/udp.go @@ -66,7 +66,7 @@ func (server *SocksServer) handlePacket(conn *net.UDPConn, packet v2net.Packet, ray := server.vPoint.DispatchToOutbound(packet) close(ray.InboundInput()) - if data, ok := <-ray.InboundOutput(); ok { + for data := range ray.InboundOutput() { response := &protocol.Socks5UDPRequest{ Fragment: 0, Address: targetAddr,