Skip to content

Commit

Permalink
(client) fix an overflow in the exponential back off code
Browse files Browse the repository at this point in the history
  • Loading branch information
bsergean committed Dec 2, 2019
1 parent 49865fe commit 92db53c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DOCKER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0
7.4.1
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ixwebsocket/IXExponentialBackoff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion ixwebsocket/IXWebSocketVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

#pragma once

#define IX_WEBSOCKET_VERSION "7.4.0"
#define IX_WEBSOCKET_VERSION "7.4.1"

0 comments on commit 92db53c

Please sign in to comment.