Reduced latency when leaving NetPlayServer by adjusting timeout values on enet_host_service calls
This commit is contained in:
parent
a91ccc4fab
commit
2ccc0822ff
|
@ -264,7 +264,7 @@ void NetPlayServer::ThreadFunc()
|
|||
int net;
|
||||
if (m_traversal_client)
|
||||
m_traversal_client->HandleResends();
|
||||
net = enet_host_service(m_server, &netEvent, 1000);
|
||||
net = enet_host_service(m_server, &netEvent, 100);
|
||||
while (!m_async_queue.Empty())
|
||||
{
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -171,7 +172,7 @@ private:
|
|||
bool m_is_copy_button_retry = false;
|
||||
bool m_got_stop_request = true;
|
||||
int m_buffer_size = 0;
|
||||
int m_player_count = 0;
|
||||
std::atomic<int> m_player_count = 0;
|
||||
int m_old_player_count = 0;
|
||||
bool m_host_input_authority = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue