]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: fix crash that writing char to nonblock-fd gets EAGAIN in EventCenter... 13822/head
authorliuchang0812 <liuchang0812@gmail.com>
Tue, 7 Mar 2017 06:28:21 +0000 (14:28 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Thu, 9 Mar 2017 03:43:32 +0000 (11:43 +0800)
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
src/msg/async/Event.cc

index eee29fc51b701b95d5dcf6ab2ca8cb7fd7cd3807..45d6eb1084353bebc671036f2d22377c818eb80e 100644 (file)
@@ -323,8 +323,10 @@ void EventCenter::wakeup()
   // wake up "event_wait"
   int n = write(notify_send_fd, &buf, sizeof(buf));
   if (n < 0) {
-    ldout(cct, 1) << __func__ << " write notify pipe failed: " << cpp_strerror(errno) << dendl;
-    ceph_abort();
+    if (errno != EAGAIN) {
+      ldout(cct, 1) << __func__ << " write notify pipe failed: " << cpp_strerror(errno) << dendl;
+      ceph_abort();
+    }
   }
 }