Synchronise heartbeat

This commit is contained in:
Les De Ridder 2017-02-14 23:43:46 +01:00
parent fdf78de626
commit 68516ef824
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
1 changed files with 9 additions and 0 deletions

View File

@ -313,9 +313,18 @@ class ApiClient
private void heartbeatLoop()
{
while(_busy)
{
sleep(10.msecs);
}
_busy = true;
auto technicalRequest = new TechnicalRequest("heartbeat");
sendRequest("sequential", technicalRequest);
_busy = false;
sleep(10000.msecs);
//TODO: Add a random action to prevent timeout