Skip to content

Commit 39969cc

Browse files
authored
Merge pull request #269 from elias-a/reuse-port
Add SO_REUSEADDR option before binding to port
2 parents 0fa1197 + 973033c commit 39969cc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ We are certain the list is incomplete; please let one of us know by opening an [
3737
+ Alex Herrera ([@aherrera1721](https://github.com/aherrera1721))
3838
+ Michał Górny ([@mgorny](https://github.com/mgorny))
3939
+ Ryder Johnson ([@UZ9](https://github.com/UZ9))
40+
+ Elias Alstead ([@elias-a](https://github.com/elias-a))
4041

4142
## Full timeline of vpython development
4243

vpython/no_notebook.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def signal_handler(signal, frame):
6060

6161
def find_free_port(port):
6262
s = socket.socket()
63+
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
6364
s.bind(('', port))
6465
return s.getsockname()[1]
6566

0 commit comments

Comments
 (0)