Skip to content

Commit 17ab8c0

Browse files
committed
set SO_REUSEADDR to 1
1 parent 2d7344c commit 17ab8c0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

reflex/utils/processes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def _can_bind_at_port(
6868
"""
6969
try:
7070
with closing(socket.socket(address_family, socket.SOCK_STREAM)) as sock:
71+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
7172
sock.bind((address, port))
7273
except (OverflowError, PermissionError, OSError) as e:
7374
console.warn(f"Unable to bind to {address}:{port} due to: {e}.")

0 commit comments

Comments
 (0)