Fix a race condition where pCampbot actions could continue even if a bot had disconnected.

link-sitting
Justin Clark-Casey (justincc) 2013-11-05 20:58:52 +00:00
parent 2b069a3b1e
commit 2d315ec207
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ namespace pCampBot
//add additional steps and/or things the bot should do //add additional steps and/or things the bot should do
private void Action() private void Action()
{ {
while (ConnectionState != ConnectionState.Disconnecting) while (ConnectionState == ConnectionState.Connected)
{ {
lock (Behaviours) lock (Behaviours)
{ {