Skip to content

Commit

Permalink
set socket REUSEADDR opt for the remote debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
lins05 committed Nov 27, 2017
1 parent d367623 commit 708f16d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pudb/remote.py
Expand Up @@ -131,6 +131,7 @@ def get_avail_port(self, host, port, search_limit=100, skew=+0):
this_port = None
for i in range(search_limit):
_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
this_port = port + i
try:
_sock.bind((host, this_port))
Expand Down

0 comments on commit 708f16d

Please sign in to comment.