From 4a93c84adbf4224465ce8d09145e0282b8055b09 Mon Sep 17 00:00:00 2001 From: hilnius Date: Mon, 8 Jul 2013 15:34:12 +0000 Subject: [PATCH] server-client connection should work now git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/networking@13124 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/network/protocols/lobby_room_protocol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/network/protocols/lobby_room_protocol.cpp b/src/network/protocols/lobby_room_protocol.cpp index e62cef88c..a872e5dcd 100644 --- a/src/network/protocols/lobby_room_protocol.cpp +++ b/src/network/protocols/lobby_room_protocol.cpp @@ -23,6 +23,7 @@ #include "network/client_network_manager.hpp" #include "network/protocols/get_public_address.hpp" #include "network/protocols/show_public_address.hpp" +#include "network/protocols/connect_to_peer.hpp" #include "online/current_online_user.hpp" #include "online/http_connector.hpp" #include "config/user_config.hpp" @@ -267,7 +268,7 @@ void ServerLobbyRoomProtocol::update() case WORKING: // first poll every 5 seconds static double last_poll_time = 0; - if (Time::getRealTime() > last_poll_time+5.0) + if (Time::getRealTime() > last_poll_time+10.0) { last_poll_time = Time::getRealTime(); HTTPConnector * connector = new HTTPConnector((std::string)UserConfigParams::m_server_multiplayer + "address-management.php"); @@ -297,8 +298,9 @@ void ServerLobbyRoomProtocol::update() // now for (int i = 0; i < m_incoming_peers_ids.size(); i++) { - + ProtocolManager::getInstance()->requestStart(new ConnectToPeer(m_incoming_peers_ids[i])); } + m_incoming_peers_ids.clear(); break; case DONE: