NetPlay: Add timeout to traversal code path

Amendment to 600c816 as I missed the traversal case.
This commit is contained in:
Techjar 2022-03-14 00:19:54 -04:00
parent 905e86d754
commit b1122ec94f
1 changed files with 4 additions and 0 deletions

View File

@ -210,6 +210,10 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
{
case ENET_EVENT_TYPE_CONNECT:
m_server = netEvent.peer;
// Extend reliable traffic timeout
enet_peer_timeout(m_server, 0, 30000, 30000);
if (Connect())
{
m_connection_state = ConnectionState::Connected;