mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-07-26 11:44:22 -04:00
fix race condition in shadowsocks
This commit is contained in:
parent
265c9e4abb
commit
2d1ded9b9e
@ -74,13 +74,13 @@ func (this *Shadowsocks) Listen(port v2net.Port) error {
|
|||||||
this.tcpHub = tcpHub
|
this.tcpHub = tcpHub
|
||||||
|
|
||||||
if this.config.UDP {
|
if this.config.UDP {
|
||||||
|
this.udpServer = hub.NewUDPServer(this.packetDispatcher)
|
||||||
udpHub, err := hub.ListenUDP(port, this.handlerUDPPayload)
|
udpHub, err := hub.ListenUDP(port, this.handlerUDPPayload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Shadowsocks: Failed to listen UDP on port ", port, ": ", err)
|
log.Error("Shadowsocks: Failed to listen UDP on port ", port, ": ", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
this.udpHub = udpHub
|
this.udpHub = udpHub
|
||||||
this.udpServer = hub.NewUDPServer(this.packetDispatcher)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user