diff options
Diffstat (limited to '')
-rw-r--r-- | src/msg/async/Event.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index 1e109230282..2c545c07b37 100644 --- a/src/msg/async/Event.cc +++ b/src/msg/async/Event.cc @@ -148,16 +148,14 @@ int EventCenter::init(int nevent, unsigned center_id, const std::string &type) int fds[2]; #ifdef _WIN32 - r = win_socketpair(fds); - if (r != 0) - return -r; + if (win_socketpair(fds) < 0) { #else if (pipe_cloexec(fds, 0) < 0) { + #endif int e = ceph_sock_errno(); lderr(cct) << __func__ << " can't create notify pipe: " << cpp_strerror(e) << dendl; return -e; } - #endif notify_receive_fd = fds[0]; notify_send_fd = fds[1]; |