Skip to content

Give client bots a handler for pipe disconnection #71

@dgant

Description

@dgant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bwapi-serversideDepends on changes on the server side of bwapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions