UltraMachine / rust-sc2

SC2 API for Rust
MIT License
38 stars 17 forks source link

calling leave() resulted in hanging bot #88

Closed LordBlackhawk closed 9 months ago

LordBlackhawk commented 12 months ago

I found a small bug: Calling Bot::leave() sent a leave request to SC2, but did not terminate the main loop. The next time some communication with SC2 happens, the bot waits for response and hangs.

I am not sure how good the bugfix is, but this was my best idea without changing the public interface.

I moved the send_request code intensionally to ensure that e.g. mutliple calls to leave do not result in the same problem.

UltraMachine commented 9 months ago

It's strange how I didn't notice this before :thinking: