(websocket client) heartbeat is not sent at the requested frequency (fix #232)
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -6,4 +6,4 @@
 | 
			
		||||
 | 
			
		||||
#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)
 | 
			
		||||
            {
 | 
			
		||||
                spdlog::info("Received pong");
 | 
			
		||||
                spdlog::info("Received pong {}", msg->str);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user