Fix boost::asio misuse that would cause lag

io_service::reset was not called before io_service::poll, meaning that new events would be really polled in the next Connection::poll call, this could lead to network lag in computers with low framerate (ie: a user with 10 fps would have 100ms lag just because of that)
master
Eduardo Bart 11 years ago
parent 84b722f8c7
commit 38dec168ee

@ -50,8 +50,9 @@ Connection::~Connection()
void Connection::poll()
{
g_ioService.poll();
// reset must always be called prior to poll
g_ioService.reset();
g_ioService.poll();
}
void Connection::terminate()

Loading…
Cancel
Save