V2Ray 10 years ago
parent
commit
38e64bf2ce
1 changed files with 3 additions and 0 deletions
  1. 3 0
      proxy/socks/udp.go

+ 3 - 0
proxy/socks/udp.go

@@ -66,5 +66,8 @@ func (server *SocksServer) handlePacket(conn *net.UDPConn, packet v2net.Packet,
 		request.Data = data
 		udpMessage := request.Bytes(nil)
 		nBytes, err := conn.WriteToUDP(udpMessage, clientAddr)
+    if err != nil {
+      log.Error("Socks failed to write UDP message (%d bytes) to %s: %v", nBytes, clientAddr.String(), err)
+    }
 	}
 }