mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #10350 from Techjar/netplay-longer-timeout
Core/NetPlay: Extend enet peer timeout
This commit is contained in:
commit
c0fada6fec
@ -150,6 +150,9 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
|
||||
return;
|
||||
}
|
||||
|
||||
// Extend reliable traffic timeout
|
||||
enet_peer_timeout(m_server, 0, 30000, 30000);
|
||||
|
||||
ENetEvent netEvent;
|
||||
int net = enet_host_service(m_client, &netEvent, 5000);
|
||||
if (net > 0 && netEvent.type == ENET_EVENT_TYPE_CONNECT)
|
||||
|
@ -415,6 +415,9 @@ ConnectionError NetPlayServer::OnConnect(ENetPeer* socket, sf::Packet& rpac)
|
||||
if (StringUTF8CodePointCount(player.name) > MAX_NAME_LENGTH)
|
||||
return ConnectionError::NameTooLong;
|
||||
|
||||
// Extend reliable traffic timeout
|
||||
enet_peer_timeout(socket, 0, 30000, 30000);
|
||||
|
||||
// cause pings to be updated
|
||||
m_update_pings = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user