try
{
while (_Connection.IsConnected &&
((data = _Connection._Reader.ReadLine()) != null))
{
_Queue.Enqueue(data);
QueuedEvent.Set();
}
}
I'm having some problems with this portion of the code. When I am telling the IRC bot to Disconnect(), it is hanging at _Thread.Join() until the ReadLine() goes through the loop (when it receives another message in a channel or anything that causes ReadLine() to have data), at which time it catches the Abort() call.
This is causing me problems with the bot hanging after I tell it to disconnect, it won't actually disconnect until something is first received.
Am I doing something wrong here?
I'm having some problems with this portion of the code. When I am telling the IRC bot to Disconnect(), it is hanging at _Thread.Join() until the ReadLine() goes through the loop (when it receives another message in a channel or anything that causes ReadLine() to have data), at which time it catches the Abort() call.
This is causing me problems with the bot hanging after I tell it to disconnect, it won't actually disconnect until something is first received.
Am I doing something wrong here?