From 2cedd6729ab1fd934a0fe69f918ab13f48756fd8 Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 16 Mar 2018 01:14:43 +0800 Subject: [PATCH] Try to connect anyway even without aloha message This should allow clients with strong firewall to connect to server not behind any firewall --- src/network/protocols/connect_to_server.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/network/protocols/connect_to_server.cpp b/src/network/protocols/connect_to_server.cpp index 36eabdd7f..cdfd8522a 100644 --- a/src/network/protocols/connect_to_server.cpp +++ b/src/network/protocols/connect_to_server.cpp @@ -159,9 +159,13 @@ void ConnectToServer::asynchronousUpdate() } if (m_tried_connection++ > 10) { - Log::error("ConnectToServer", "Timeout waiting for aloha"); - m_state = NetworkConfig::get()->isWAN() ? - HIDING_ADDRESS : DONE; + Log::warn("ConnectToServer", "Timeout waiting for" + " aloha, trying to connect anyway."); + m_state = CONNECTING; + // Reset timer for next usage + m_timer = 0.0; + m_tried_connection = 0; + return; } if ((!NetworkConfig::m_disable_lan && m_server_address.getIP() ==