parent
08506dedf7
commit
5764374e5d
|
@ -186,6 +186,9 @@ class HostTester(Socks5, IdleObject):
|
|||
|
||||
def connect(self):
|
||||
''' create the socket and plug it to the idlequeue '''
|
||||
if self.host is None:
|
||||
self.on_failure()
|
||||
return None
|
||||
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self._sock.setblocking(False)
|
||||
self.fd = self._sock.fileno()
|
||||
|
|
|
@ -350,7 +350,10 @@ class SocksQueue:
|
|||
class Socks5:
|
||||
def __init__(self, idlequeue, host, port, initiator, target, sid):
|
||||
if host is not None:
|
||||
try:
|
||||
self.host = socket.gethostbyname(host)
|
||||
except socket.gaierror:
|
||||
self.host = None
|
||||
self.idlequeue = idlequeue
|
||||
self.fd = -1
|
||||
self.port = port
|
||||
|
|
Loading…
Reference in New Issue