lazy init of socks5 response

pull/40/head
V2Ray 2015-10-04 16:53:50 +02:00
parent 507da1a451
commit 1d1708ea3c
1 changed files with 1 additions and 2 deletions

View File

@ -128,12 +128,11 @@ func (server *SocksServer) handleSocks5(reader *v2net.TimeOutReader, writer io.W
return err
}
response := protocol.NewSocks5Response()
if request.Command == protocol.CmdUdpAssociate && server.config.UDPEnabled {
return server.handleUDP(reader, writer)
}
response := protocol.NewSocks5Response()
if request.Command == protocol.CmdBind || request.Command == protocol.CmdUdpAssociate {
response := protocol.NewSocks5Response()
response.Error = protocol.ErrorCommandNotSupported