(client) internal IXDNSLookup class requires a valid cancellation request function callback to be passed in

This commit is contained in:
Benjamin Sergeant 2019-12-02 14:52:19 -08:00
parent d82e05f72d
commit 6b98694caa
5 changed files with 15 additions and 6 deletions

View File

@ -1 +1 @@
7.4.1
7.4.2

View File

@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.
## [7.4.2] - 2019-12-02
- (client) internal IXDNSLookup class requires a valid cancellation request function callback to be passed in
## [7.4.1] - 2019-12-02
- (client) fix an overflow in the exponential back off code

View File

@ -29,8 +29,13 @@ namespace ix
return false;
}
CancellationRequest cancellationRequest = []() -> bool
{
return false;
};
std::string errMsg;
return _socket->connect(hostname, port, errMsg, nullptr);
return _socket->connect(hostname, port, errMsg, cancellationRequest);
}
void RedisClient::stop()

View File

@ -61,7 +61,7 @@ namespace ix
errMsg = "no error";
// Maybe a cancellation request got in before the background thread terminated ?
if (isCancellationRequested && isCancellationRequested())
if (isCancellationRequested())
{
errMsg = "cancellation requested";
return nullptr;
@ -107,7 +107,7 @@ namespace ix
std::this_thread::sleep_for(std::chrono::milliseconds(_wait));
// Were we cancelled ?
if (isCancellationRequested && isCancellationRequested())
if (isCancellationRequested())
{
errMsg = "cancellation requested";
return nullptr;
@ -115,7 +115,7 @@ namespace ix
}
// Maybe a cancellation request got in before the bg terminated ?
if (isCancellationRequested && isCancellationRequested())
if (isCancellationRequested())
{
errMsg = "cancellation requested";
return nullptr;

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "7.4.1"
#define IX_WEBSOCKET_VERSION "7.4.2"