Skip to content

Commit

Permalink
chore: Give sleep to force start to avoid spamming
Browse files Browse the repository at this point in the history
  • Loading branch information
strakam committed Jan 7, 2025
1 parent 7c87c34 commit aaaab93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generals/remote/generalsio_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

import numpy as np
from socketio import SimpleClient # type: ignore

Expand Down Expand Up @@ -97,6 +99,7 @@ def join_game(self, force_start: bool = True) -> None:
"""
self._status = "queue"
while True:
time.sleep(2) # dont spam servers
event, *data = self.receive()
self.emit("set_force_start", (self.queue_id, force_start))
if event == "game_start":
Expand Down

0 comments on commit aaaab93

Please sign in to comment.