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:
lotodore
2009-06-07 23:25:13 +00:00
parent a6146399d4
commit c8594e8e7b
10 changed files with 56 additions and 44 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ protected:
virtual void Main();
void RegisterTimers();
void HandleRead(SessionId sessionId, const boost::system::error_code& error, size_t bytesRead);
void HandleRead(SessionId sessionId, const boost::system::error_code &error, size_t bytesRead);
void HandlePacket(SessionWrapper session, boost::shared_ptr<NetPacket> packet);
void HandleNetPacketInit(SessionWrapper session, const NetPacketInit &tmpPacket);
void HandleNetPacketAvatarHeader(SessionWrapper session, const NetPacketAvatarHeader &tmpPacket);