(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

@ -1,6 +1,10 @@
# Changelog
All changes to this project will be documented in this file.
## [10.1.0] - 2020-07-29
(websocket client) heartbeat is not sent at the requested frequency (fix #232)
## [10.0.3] - 2020-07-28
compiler warning fixes

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"

View File

@ -200,7 +200,7 @@ namespace ix
}
else if (msg->type == ix::WebSocketMessageType::Pong)
{
spdlog::info("Received pong");
spdlog::info("Received pong {}", msg->str);
}
else
{