Skip to content

Commit 58a0bbb

Browse files
chore: allow sock to be re-used
1 parent 6d16bf3 commit 58a0bbb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ async def start_proxy_server(instance: FakeCSQLInstance) -> None:
106106
tmpdir, instance.server_cert_pem, "", server_key_bytes
107107
)
108108
context.load_cert_chain(server_filename, key_filename)
109+
# allow socket to be re-used
110+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
109111
# bind socket to Cloud SQL proxy server port on localhost
110112
sock.bind((ip_address, port))
111113
# listen for incoming connections

0 commit comments

Comments
 (0)