Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89abeb0 commit 5be0a83Copy full SHA for 5be0a83
1 file changed
lib/core/option.py
@@ -1026,12 +1026,16 @@ def _setSocketPreConnect():
1026
1027
def _():
1028
while kb.threadContinue:
1029
- for address in socket._ready:
1030
- if len(socket._ready[address]) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
1031
- s = socket.socket()
1032
- s._connect(address)
1033
- socket._ready[address].append(s._sock)
1034
- time.sleep(0.01)
+ try:
+ for address in socket._ready:
+ if len(socket._ready[address]) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
+ s = socket.socket()
+ s._connect(address)
+ socket._ready[address].append(s._sock)
1035
+ except socket.error:
1036
+ pass
1037
+ finally:
1038
+ time.sleep(0.01)
1039
1040
def connect(self, address):
1041
found = False
0 commit comments