Shutdown a bot's actions by making it check for disconnecting state rather than aborting the thread.
Aborting the thread appears to be causing shutdown issues.0.7.6-extended
parent
3a62f39044
commit
97c514daa5
|
@ -158,7 +158,7 @@ namespace pCampBot
|
|||
//add additional steps and/or things the bot should do
|
||||
private void Action()
|
||||
{
|
||||
while (true)
|
||||
while (ConnectionState != ConnectionState.Disconnecting)
|
||||
lock (Behaviours)
|
||||
Behaviours.ForEach(
|
||||
b =>
|
||||
|
@ -178,8 +178,8 @@ namespace pCampBot
|
|||
{
|
||||
ConnectionState = ConnectionState.Disconnecting;
|
||||
|
||||
if (m_actionThread != null)
|
||||
m_actionThread.Abort();
|
||||
// if (m_actionThread != null)
|
||||
// m_actionThread.Abort();
|
||||
|
||||
Client.Network.Logout();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue