Skip to content

Commit 5bc2ddd

Browse files
Merge branch 'main' of https://github.com/Bhargavkonidena/pulsar-client-cpp into issue_489
2 parents f099d70 + ff074bf commit 5bc2ddd

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ else() # GCC or Clang are mostly compatible:
9999
add_compile_options(-Wall -Wformat-security -Wvla -Werror)
100100
# Turn off certain warnings that are too much pain for too little gain:
101101
add_compile_options(-Wno-sign-compare -Wno-deprecated-declarations -Wno-error=cpp)
102-
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR APPLE)
102+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
103103
add_compile_options(-msse4.2 -mpclmul)
104104
endif()
105105
# Options unique to Clang or GCC:

lib/AutoClusterFailover.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class AutoClusterFailoverImpl : public std::enable_shared_from_this<AutoClusterF
173173
ASIO_ERROR ignored;
174174
context->resolver.cancel();
175175
context->socket.close(ignored);
176-
context->timer.cancel(ignored);
176+
cancelTimer(context->timer);
177177

178178
context->callback(success);
179179
}

tests/AuthTokenTest.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <pulsar/Client.h>
2323

2424
#include <boost/algorithm/string.hpp>
25+
#include <cctype>
2526
#include <fstream>
2627
#include <streambuf>
2728
#include <string>
@@ -45,6 +46,9 @@ static const std::string tokenPath = TOKEN_PATH;
4546
std::string getToken() {
4647
std::ifstream file(tokenPath);
4748
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
49+
while (!str.empty() && isspace(str.back())) {
50+
str.pop_back();
51+
}
4852
return str;
4953
}
5054

0 commit comments

Comments
 (0)