mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix server shut down on exit.
If there's a websocket being waited on the shut down won't actually happen. Add a new event for shut down and send it to break the websocket out of its loop.
This commit is contained in:
@@ -25,6 +25,7 @@ class GameUpdateEvents:
|
||||
deleted_flights: set[UUID] = field(default_factory=set)
|
||||
selected_flight: UUID | None = None
|
||||
deselected_flight: bool = False
|
||||
shutting_down: bool = False
|
||||
|
||||
@property
|
||||
def empty(self) -> bool:
|
||||
@@ -89,3 +90,7 @@ class GameUpdateEvents:
|
||||
self.deselected_flight = True
|
||||
self.selected_flight = None
|
||||
return self
|
||||
|
||||
def shut_down(self) -> GameUpdateEvents:
|
||||
self.shutting_down = True
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user