diff --git a/DOCKER_VERSION b/DOCKER_VERSION index ba7f754d..815da58b 100644 --- a/DOCKER_VERSION +++ b/DOCKER_VERSION @@ -1 +1 @@ -7.4.0 +7.4.1 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6fc5f896..9414594a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [7.4.1] - 2019-12-02 + +- (client) fix an overflow in the exponential back off code + ## [7.4.0] - 2019-11-25 - (http client) Add support for multipart HTTP POST upload diff --git a/ixwebsocket/IXExponentialBackoff.cpp b/ixwebsocket/IXExponentialBackoff.cpp index 306b0fc5..0cdb3fc9 100644 --- a/ixwebsocket/IXExponentialBackoff.cpp +++ b/ixwebsocket/IXExponentialBackoff.cpp @@ -13,7 +13,7 @@ namespace ix uint32_t calculateRetryWaitMilliseconds(uint32_t retry_count, uint32_t maxWaitBetweenReconnectionRetries) { - uint32_t wait_time = std::pow(2, retry_count) * 100; + uint32_t wait_time = (retry_count < 26) ? (std::pow(2, retry_count) * 100) : 0; if (wait_time > maxWaitBetweenReconnectionRetries || wait_time == 0) { diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index de9080f5..231b91e7 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "7.4.0" +#define IX_WEBSOCKET_VERSION "7.4.1"