From 5440bf64c1583e4e547dc6dbd0aca257b8b8b07b Mon Sep 17 00:00:00 2001 From: Bryan Dallas Date: Tue, 1 Sep 2015 10:58:34 -0400 Subject: [PATCH] Added a lock for when we read the connect_state_. --- src/client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client.cpp b/src/client.cpp index 2865f78..e8dd98b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -93,7 +93,10 @@ bool Redox::connectUnix(const string &path, function connection_callb } // Return if succeeded - return connect_state_ == CONNECTED; + { + unique_lock ul(connect_lock_); + return connect_state_ == CONNECTED; + } } void Redox::disconnect() { -- libgit2 0.21.4