summaryrefslogtreecommitdiffstats
path: root/src/librados/RadosClient.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/librados/RadosClient.cc')
-rw-r--r--src/librados/RadosClient.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc
index 08b960d002a..3e0de3adeb1 100644
--- a/src/librados/RadosClient.cc
+++ b/src/librados/RadosClient.cc
@@ -825,10 +825,12 @@ int librados::RadosClient::mgr_command(const vector<string>& cmd,
Mutex::Locker l(lock);
C_SaferCond cond;
- mgrclient.start_command(cmd, inbl, outbl, outs, &cond);
+ int r = mgrclient.start_command(cmd, inbl, outbl, outs, &cond);
+ if (r < 0)
+ return r;
lock.Unlock();
- int r = cond.wait();
+ r = cond.wait();
lock.Lock();
return r;