HardlyDifficult / HardlyBot

A Twitch.tv ChatBot
http://www.twitch.tv/hardlysober/
11 stars 11 forks source link

TwitchGameStateMachine race condition - Timers firing when should be closed. #48

Closed HardlyDifficult closed 8 years ago

HardlyDifficult commented 8 years ago

I don't know what to do... HELP

HardlyDifficult commented 8 years ago

It seems the game state is correct, just bad messaging from timers. Could wrap with isCorrectState check but that masks the real issue it seems.

HardlyDifficult commented 8 years ago

Fixed, I believe.

I added another lock. It seems Open was being called after Closed which would explain the timer issue. Adding the isClosed= check to GameState didn't seem to matter, but the lock there may have corrected our problem.