NetPlay: Add timeout to traversal code path
Amendment to 600c816
as I missed the traversal case.
This commit is contained in:
parent
905e86d754
commit
b1122ec94f
|
@ -210,6 +210,10 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
|
||||||
{
|
{
|
||||||
case ENET_EVENT_TYPE_CONNECT:
|
case ENET_EVENT_TYPE_CONNECT:
|
||||||
m_server = netEvent.peer;
|
m_server = netEvent.peer;
|
||||||
|
|
||||||
|
// Extend reliable traffic timeout
|
||||||
|
enet_peer_timeout(m_server, 0, 30000, 30000);
|
||||||
|
|
||||||
if (Connect())
|
if (Connect())
|
||||||
{
|
{
|
||||||
m_connection_state = ConnectionState::Connected;
|
m_connection_state = ConnectionState::Connected;
|
||||||
|
|
Loading…
Reference in New Issue