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:
@@ -24,7 +24,7 @@
|
||||
#include <core/loghelper.h>
|
||||
|
||||
|
||||
#define NET_SERVER_LISTEN_BACKLOG 5
|
||||
#define NET_SERVER_LISTEN_BACKLOG 20
|
||||
|
||||
using namespace std;
|
||||
using boost::asio::ip::tcp;
|
||||
@@ -96,7 +96,7 @@ ServerAcceptHelper::InternalListen(unsigned serverPort, bool ipv6, bool sctp)
|
||||
|
||||
void
|
||||
ServerAcceptHelper::HandleAccept(boost::shared_ptr<boost::asio::ip::tcp::socket> acceptedSocket,
|
||||
const boost::system::error_code& error)
|
||||
const boost::system::error_code &error)
|
||||
{
|
||||
if (!error)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user