Skip to content

Commit

Permalink
Add wait for ndif connection
Browse files Browse the repository at this point in the history
  • Loading branch information
JadenFiotto-Kaufman committed Dec 28, 2023
1 parent 20ef1fe commit 1126bc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nnsight/contexts/Runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ def run_server(self):

def blocking_request(self, request: pydantics.RequestModel):
# Create a socketio connection to the server.
sio = socketio.Client(logger=logger)
sio = socketio.Client(logger=logger, reconnection_attempts=10)

sio.connect(
f"wss://{CONFIG.API.HOST}",
socketio_path="/ws/socket.io",
transports=["websocket"],
wait_timeout=10
)

# Called when receiving a response from the server.
Expand Down

0 comments on commit 1126bc9

Please sign in to comment.