Skip to content

Commit dd3e7b4

Browse files
committed
Fix crash when a realtime game ends
1 parent fb08ca9 commit dd3e7b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sc2/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ async def _play_game_ai(client, player_id, ai, realtime, step_time_limit, game_t
169169
time_window.clear()
170170
except Exception as e:
171171
if isinstance(e, ProtocolError) and e.is_game_over_error:
172+
if realtime:
173+
return None
172174
result = client._game_result[player_id]
173175
if result is None:
174176
log.error("Game over, but no results gathered")

0 commit comments

Comments
 (0)