Show More
@@ -36,6 +36,7 b' import urlobject' | |||
|
36 | 36 | import uuid |
|
37 | 37 | import getpass |
|
38 | 38 | import socket |
|
39 | import errno | |
|
39 | 40 | import random |
|
40 | 41 | from functools import update_wrapper, partial, wraps |
|
41 | 42 | |
@@ -1201,7 +1202,11 b' def get_available_port(min_port=40000, m' | |||
|
1201 | 1202 | sock.close() |
|
1202 | 1203 | break |
|
1203 | 1204 | except OSError: |
|
1204 |
|
|
|
1205 | continue | |
|
1206 | except socket.error as e: | |
|
1207 | if e.args[0] in [errno.EADDRINUSE, errno.ECONNREFUSED]: | |
|
1208 | continue | |
|
1209 | raise | |
|
1205 | 1210 | |
|
1206 | 1211 | del sock |
|
1207 | 1212 | return pick_port |
General Comments 0
You need to be logged in to leave comments.
Login now