Skip to content
Snippets Groups Projects
Commit 7ed2949b authored by kopf's avatar kopf
Browse files

reduced sleeping time for the reconnection of the heatbeat

parent e2b4a2b0
No related branches found
No related tags found
No related merge requests found
...@@ -145,13 +145,13 @@ bool NetworkClient::SendHeartbeat(){ ...@@ -145,13 +145,13 @@ bool NetworkClient::SendHeartbeat(){
while(!_theHeartbeatStream){ while(!_theHeartbeatStream){
Warning << "Could not send heartbeat " << counter << " time!" << endmsg; Warning << "Could not send heartbeat " << counter << " time!" << endmsg;
Warning << "current error message " << _theHeartbeatStream.error().message() << endmsg; Warning << "current error message " << _theHeartbeatStream.error().message() << endmsg;
std::this_thread::sleep_for( std::chrono::seconds(5)); std::this_thread::sleep_for( std::chrono::seconds(1));
_theHeartbeatStream.clear(); _theHeartbeatStream.clear();
_theHeartbeatStream.connect(_serverAddress, _port); _theHeartbeatStream.connect(_serverAddress, _port);
counter++; counter++;
if (counter>20){ if (counter>20){
Alert << "Could not send heartbeat last time" << endmsg; Alert << "Could not send heartbeat last time" << endmsg;
return false; exit(0);
} }
Warning << "Try to send heartbeat again!!!" << endmsg; Warning << "Try to send heartbeat again!!!" << endmsg;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment