Skip to content

Commit

Permalink
Merge pull request #509 from hirokiht/fix_monitor_draft_libzmq-4-3
Browse files Browse the repository at this point in the history
Fix handshake event don't need DRAFT API in libzmq v4.3.0 and above
  • Loading branch information
gummif committed Jul 19, 2021
2 parents 73b18d5 + e8d0f4a commit b4c5c6a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions zmq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down

0 comments on commit b4c5c6a

Please sign in to comment.