Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

fix race condition in tcp_client::connect #3

Merged
merged 1 commit into from
Nov 27, 2015
Merged

Conversation

tobbe303
Copy link

There is a race in the TCP client when connecting to the Redis host. The std::condition_variable is notified before the m_is_connected boolean is toggled possibly causing the connection to fail. This appears to happen very frequently in my setup.

@Cylix
Copy link
Owner

Cylix commented Nov 27, 2015

You are right. This is curious that I didn't notice this before.
Thank you for the report and the patch!

@Cylix Cylix closed this Nov 27, 2015
@Cylix Cylix reopened this Nov 27, 2015
Cylix added a commit that referenced this pull request Nov 27, 2015
fix race condition in tcp_client::connect
@Cylix Cylix merged commit dc251c6 into Cylix:master Nov 27, 2015
@Cylix Cylix mentioned this pull request Nov 27, 2015
cmorse pushed a commit to cmorse/cpp_redis that referenced this pull request Oct 18, 2017
Avoid using typedef names over full specialization.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants