You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give client bots a handler for pipe disconnection #71
This is a feature proposal which I also added to BWAPI: bwapi/bwapi#873 -- it's a quality-of-life feature that has no particular need to synchronize with mainline BWAPI though, so I've added it here separately
Real-time performance requirements in competition disincentivize bots from logging directly to disk. The incentive is instead to flush logs at the end.
However, if a client bot's pipe connection to StarCraft is broken, no further event handlers are called, leaving the bot without a last-ditch chance to flush logs.
Proposed feature: An onTermination() handler which is always called after a game, even in event of disconnection. This handler is called with the expectation that BWAPI is no longer accessible. This would allow bots a chance to flush any logs if they haven't already.
Activity
JasperGeurtz commentedon Jul 11, 2021
you can maybe tr()/catch()/finally() the BWMirror#startGame call, to get the desired behavior, or at least partially