From e8d0f4a4e82dfa9f37586fe6b66db48af7763f0f Mon Sep 17 00:00:00 2001 From: Hiroki Takeuchi Date: Mon, 19 Jul 2021 08:49:17 +0000 Subject: [PATCH] Fix handshake event don't need DRAFT API in libzmq v4.3.0 and above --- zmq.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zmq.hpp b/zmq.hpp index 39ca13c..6778ab2 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -2397,8 +2397,7 @@ class monitor_t case ZMQ_EVENT_DISCONNECTED: on_event_disconnected(*event, address.c_str()); break; -#ifdef ZMQ_BUILD_DRAFT_API -#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 3) +#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 0) || (defined(ZMQ_BUILD_DRAFT_API) && ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 3)) case ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL: on_event_handshake_failed_no_detail(*event, address.c_str()); break; @@ -2411,14 +2410,13 @@ class monitor_t case ZMQ_EVENT_HANDSHAKE_SUCCEEDED: on_event_handshake_succeeded(*event, address.c_str()); break; -#elif ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 1) +#elif defined(ZMQ_BUILD_DRAFT_API) && ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 1) case ZMQ_EVENT_HANDSHAKE_FAILED: on_event_handshake_failed(*event, address.c_str()); break; case ZMQ_EVENT_HANDSHAKE_SUCCEED: on_event_handshake_succeed(*event, address.c_str()); break; -#endif #endif default: on_event_unknown(*event, address.c_str());