pdxcodemonkey commented on a change in pull request #772:
URL: https://github.com/apache/geode-native/pull/772#discussion_r600702071
##########
File path: cppcache/src/TcrConnectionManager.cpp
##########
@@ -276,22 +276,21 @@ int TcrConnectionManager::checkConnection(const
ACE_Time_Value &,
int TcrConnectionManager::checkRedundancy(const ACE_Time_Value &,
const void *) {
- m_redundancySema.release();
+ redundancy_semaphore_.release();
return 0;
}
void TcrConnectionManager::failover(std::atomic<bool> &isRunning) {
LOGFINE("TcrConnectionManager: starting failover thread");
+
+ failover_semaphore_.acquire();
while (isRunning) {
- m_failoverSema.acquire();
- if (isRunning && !m_isNetDown) {
+ if (!m_isNetDown) {
try {
std::lock_guard<decltype(m_distMngrsLock)> guard(m_distMngrsLock);
for (const auto &it : m_distMngrs) {
it->failover();
}
Review comment:
Yep, the `failover()` call is supposed to do a `release()`. Ugh.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]