Skip to content

Commit

Permalink
fix Cylix#168 by locking m_psubscribed_channels mutex in reconnect pr…
Browse files Browse the repository at this point in the history
…ocess
  • Loading branch information
Cylix committed Mar 13, 2018
1 parent 2a22c32 commit 1d0d08f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/core/subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ subscriber::connection_disconnection_handler(network::redis_connection&) {
}

//! Lock the callbacks mutex of the base class to prevent more subscriber commands from being issued until our reconnect has completed.
std::lock_guard<std::mutex> lock_callback(m_subscribed_channels_mutex);
std::lock_guard<std::mutex> sub_lock_callback(m_subscribed_channels_mutex);
std::lock_guard<std::mutex> psub_lock_callback(m_psubscribed_channels_mutex);

while (should_reconnect()) {
sleep_before_next_reconnect_attempt();
Expand Down

0 comments on commit 1d0d08f

Please sign in to comment.