when sending file, try to bind ipv6 first. see #1969
This commit is contained in:
parent
0492b82384
commit
765336b4fb
|
@ -793,6 +793,7 @@ class Socks5Listener(IdleObject):
|
||||||
self.port = port
|
self.port = port
|
||||||
self.ais = socket.getaddrinfo(None, port, socket.AF_UNSPEC,
|
self.ais = socket.getaddrinfo(None, port, socket.AF_UNSPEC,
|
||||||
socket.SOCK_STREAM, socket.SOL_TCP, socket.AI_PASSIVE)
|
socket.SOCK_STREAM, socket.SOL_TCP, socket.AI_PASSIVE)
|
||||||
|
self.ais.sort(reverse=True) # Try IPv6 first
|
||||||
self.queue_idx = -1
|
self.queue_idx = -1
|
||||||
self.idlequeue = idlequeue
|
self.idlequeue = idlequeue
|
||||||
self.queue = None
|
self.queue = None
|
||||||
|
|
Loading…
Reference in New Issue