(websocket client) heartbeat is not sent at the requested frequency (fix #232)
This commit is contained in:
parent
c2b05af022
commit
4d51098c86
@ -1,6 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All changes to this project will be documented in this file.
|
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
|
## [10.0.3] - 2020-07-28
|
||||||
|
|
||||||
compiler warning fixes
|
compiler warning fixes
|
||||||
|
@ -263,9 +263,10 @@ namespace ix
|
|||||||
{
|
{
|
||||||
// compute lasting delay to wait for next ping / timeout, if at least one set
|
// compute lasting delay to wait for next ping / timeout, if at least one set
|
||||||
auto now = std::chrono::steady_clock::now();
|
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)
|
now - _lastSendPingTimePoint)
|
||||||
.count();
|
.count();
|
||||||
|
lastingTimeoutDelayInMs = (1000 * _pingIntervalSecs) - timeSinceLastPingMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IX_WEBSOCKET_VERSION "10.0.3"
|
#define IX_WEBSOCKET_VERSION "10.1.0"
|
||||||
|
@ -200,7 +200,7 @@ namespace ix
|
|||||||
}
|
}
|
||||||
else if (msg->type == ix::WebSocketMessageType::Pong)
|
else if (msg->type == ix::WebSocketMessageType::Pong)
|
||||||
{
|
{
|
||||||
spdlog::info("Received pong");
|
spdlog::info("Received pong {}", msg->str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user