forked from 0ad/0ad
This was SVN commit r17960.
This commit is contained in:
parent
373107898c
commit
d3255168b9
@ -494,8 +494,10 @@ bool CNetServerWorker::RunStep()
|
||||
CNetServerSession* session = new CNetServerSession(*this, event.peer);
|
||||
|
||||
// Prevent the local client of the host from timing out too quickly
|
||||
#if (ENET_VERSION >= ENET_VERSION_CREATE(1, 3, 4))
|
||||
if (session->GetIPAddress() == "127.0.0.1")
|
||||
enet_peer_timeout(event.peer, 0, MAXIMUM_HOST_TIMEOUT, MAXIMUM_HOST_TIMEOUT);
|
||||
#endif
|
||||
|
||||
m_Sessions.push_back(session);
|
||||
|
||||
|
@ -76,8 +76,10 @@ bool CNetClientSession::Connect(u16 port, const CStr& server)
|
||||
m_Server = peer;
|
||||
|
||||
// Prevent the local client of the host from timing out too quickly.
|
||||
#if (ENET_VERSION >= ENET_VERSION_CREATE(1, 3, 4))
|
||||
if (GetIPAddress() == "127.0.0.1")
|
||||
enet_peer_timeout(peer, 1, MAXIMUM_HOST_TIMEOUT, MAXIMUM_HOST_TIMEOUT);
|
||||
#endif
|
||||
|
||||
m_Stats = new CNetStatsTable(m_Server);
|
||||
if (CProfileViewer::IsInitialised())
|
||||
|
Loading…
Reference in New Issue
Block a user