]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix busy wait in RGWHTTPManager
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 2 Sep 2015 21:50:31 +0000 (14:50 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:12:39 +0000 (16:12 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_http_client.cc

index 3647de8f9f0cea961ceaf2bd74707d14fcb990ef..cf21dba127386c7b60572d19c45733246d6e023e 100644 (file)
@@ -256,6 +256,16 @@ static int do_curl_wait(CephContext *cct, CURLM *handle, int signal_fd)
     dout(0) << "ERROR: curl_multi_wait() returned " << ret << dendl;
     return -EIO;
   }
+
+  if (wait_fd.revents > 0) {
+    uint32_t buf;
+    ret = read(signal_fd, (void *)&buf, sizeof(buf));
+    if (ret < 0) {
+      ret = -errno;
+      dout(0) << "ERROR: " << __func__ << "(): read() returned " << ret << dendl;
+      return ret;
+    }
+  }
   return 0;
 }