Canceling asio timers has bad semantics, and causes loads of trouble. Therefore, cancelled timers are simply marked as such, and the asio callback is silently ignored. This fixes several crashes, if players were removed from a game due to an error, because some timers were not cancelled. *sigh* This one took a lot of nerve.
This commit is contained in:
@@ -48,7 +48,7 @@ class SendDataManager : public boost::enable_shared_from_this<SendDataManager>
|
||||
{
|
||||
}
|
||||
|
||||
void HandleWrite(const boost::system::error_code& error);
|
||||
void HandleWrite(const boost::system::error_code &error);
|
||||
|
||||
void AsyncSendNextPacket(bool handlerMode = false);
|
||||
|
||||
@@ -61,7 +61,7 @@ class SendDataManager : public boost::enable_shared_from_this<SendDataManager>
|
||||
|
||||
|
||||
void
|
||||
SendDataManager::HandleWrite(const boost::system::error_code& error)
|
||||
SendDataManager::HandleWrite(const boost::system::error_code &error)
|
||||
{
|
||||
// TODO error handling
|
||||
AsyncSendNextPacket(true);
|
||||
|
||||
Reference in New Issue
Block a user