Increase timeout in case of busy network

This commit is contained in:
Benau 2018-02-25 13:45:43 +08:00
parent 571a524f59
commit 2fcaeabf1c
2 changed files with 3 additions and 3 deletions

View File

@ -136,8 +136,8 @@ void ConnectToPeer::asynchronousUpdate()
STKHost::get()->sendRawPacket(aloha, broadcast_address);
Log::info("ConnectToPeer", "Broadcast aloha to self.");
// 10 seconds timeout
if (m_tried_connection++ > 5)
// 20 seconds timeout
if (m_tried_connection++ > 10)
{
// Not much we can do about if we don't receive the client
// connection - it could have stopped, lost network, ...

View File

@ -142,7 +142,7 @@ void ConnectToServer::asynchronousUpdate()
m_current_protocol = hide_address;
return;
}
if (m_tried_connection++ > 5)
if (m_tried_connection++ > 10)
{
Log::error("ConnectToServer", "Timeout waiting for aloha");
m_state = NetworkConfig::get()->isWAN() ?