Skip to content

Commit

Permalink
Fix crash when a realtime game ends
Browse files Browse the repository at this point in the history
  • Loading branch information
Dentosal committed Feb 14, 2019
1 parent fb08ca9 commit dd3e7b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sc2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ async def _play_game_ai(client, player_id, ai, realtime, step_time_limit, game_t
time_window.clear()
except Exception as e:
if isinstance(e, ProtocolError) and e.is_game_over_error:
if realtime:
return None
result = client._game_result[player_id]
if result is None:
log.error("Game over, but no results gathered")
Expand Down

0 comments on commit dd3e7b4

Please sign in to comment.