(websocket client) heartbeat is not sent at the requested frequency (fix #232)

This commit is contained in:
Benjamin Sergeant
2020-07-29 11:24:42 -07:00
parent c2b05af022
commit 4d51098c86
4 changed files with 8 additions and 3 deletions

View File

@ -263,9 +263,10 @@ namespace ix
{
// compute lasting delay to wait for next ping / timeout, if at least one set
auto now = std::chrono::steady_clock::now();
lastingTimeoutDelayInMs = (int) std::chrono::duration_cast<std::chrono::milliseconds>(
int timeSinceLastPingMs = (int) std::chrono::duration_cast<std::chrono::milliseconds>(
now - _lastSendPingTimePoint)
.count();
lastingTimeoutDelayInMs = (1000 * _pingIntervalSecs) - timeSinceLastPingMs;
}
#ifdef _WIN32

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "10.0.3"
#define IX_WEBSOCKET_VERSION "10.1.0"