diff --git a/src/protocol/net/ClientSession.cpp b/src/protocol/net/ClientSession.cpp index 9232a5a..b77506d 100644 --- a/src/protocol/net/ClientSession.cpp +++ b/src/protocol/net/ClientSession.cpp @@ -42,12 +42,12 @@ namespace net if (!m_established) return std::chrono::duration_cast( std::chrono::steady_clock::now() - m_creation_time - ).count() <= KI_CONNECTION_TIMEOUT; + ).count() <= (KI_CONNECTION_TIMEOUT * 2); // Otherwise, use the last time we received a heartbeat. return std::chrono::duration_cast( std::chrono::steady_clock::now() - m_last_received_heartbeat_time - ).count() <= KI_SERVER_HEARTBEAT; + ).count() <= (KI_SERVER_HEARTBEAT * 2); } void ClientSession::on_connected() diff --git a/src/protocol/net/ServerSession.cpp b/src/protocol/net/ServerSession.cpp index 72efe98..dc55b66 100644 --- a/src/protocol/net/ServerSession.cpp +++ b/src/protocol/net/ServerSession.cpp @@ -34,12 +34,12 @@ namespace net if (!m_established) return std::chrono::duration_cast( std::chrono::steady_clock::now() - m_creation_time - ).count() <= KI_CONNECTION_TIMEOUT; + ).count() <= (KI_CONNECTION_TIMEOUT * 2); // Otherwise, use the last time we received a heartbeat. return std::chrono::duration_cast( std::chrono::steady_clock::now() - m_last_received_heartbeat_time - ).count() <= KI_CLIENT_HEARTBEAT; + ).count() <= (KI_CLIENT_HEARTBEAT * 2); } void ServerSession::on_connected()