From 12eeac1903872ee1717f16bfa5a89061a2ab1b54 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 3 Jul 2017 10:57:55 +0200 Subject: [PATCH] [Node] Faster query --- src/Components/Modules/Node.hpp | 2 +- src/Components/Modules/Session.cpp | 1 + src/Components/Modules/Session.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Node.hpp b/src/Components/Modules/Node.hpp index 45d860d6..33ba7bc3 100644 --- a/src/Components/Modules/Node.hpp +++ b/src/Components/Modules/Node.hpp @@ -1,7 +1,7 @@ #pragma once #define NODE_HALFLIFE (3 * 60 * 1000) //3min -#define NODE_REQUEST_LIMIT 3 +#define NODE_REQUEST_LIMIT 10 namespace Components { diff --git a/src/Components/Modules/Session.cpp b/src/Components/Modules/Session.cpp index 5bdf4e6e..5d90762c 100644 --- a/src/Components/Modules/Session.cpp +++ b/src/Components/Modules/Session.cpp @@ -106,6 +106,7 @@ namespace Components dataPacket.set_data(packet->data); Network::SendCommand(signature.first, "sessionFin", dataPacket.SerializeAsString()); + std::this_thread::sleep_for(3ms); } } } diff --git a/src/Components/Modules/Session.hpp b/src/Components/Modules/Session.hpp index 6c73c394..f5ea6fce 100644 --- a/src/Components/Modules/Session.hpp +++ b/src/Components/Modules/Session.hpp @@ -2,7 +2,7 @@ #define SESSION_TIMEOUT (10 * 1000) //10s #define SESSION_MAX_RETRIES 3 -#define SESSION_REQUEST_LIMIT 3 +#define SESSION_REQUEST_LIMIT 10 //#define DISABLE_SESSION