Skip to content

Commit b4c5c6a

Browse files
authored
Merge pull request #509 from hirokiht/fix_monitor_draft_libzmq-4-3
Fix handshake event don't need DRAFT API in libzmq v4.3.0 and above
2 parents 73b18d5 + e8d0f4a commit b4c5c6a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

zmq.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -2397,8 +2397,7 @@ class monitor_t
23972397
case ZMQ_EVENT_DISCONNECTED:
23982398
on_event_disconnected(*event, address.c_str());
23992399
break;
2400-
#ifdef ZMQ_BUILD_DRAFT_API
2401-
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 3)
2400+
#if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 3, 0) || (defined(ZMQ_BUILD_DRAFT_API) && ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 3))
24022401
case ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL:
24032402
on_event_handshake_failed_no_detail(*event, address.c_str());
24042403
break;
@@ -2411,14 +2410,13 @@ class monitor_t
24112410
case ZMQ_EVENT_HANDSHAKE_SUCCEEDED:
24122411
on_event_handshake_succeeded(*event, address.c_str());
24132412
break;
2414-
#elif ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 1)
2413+
#elif defined(ZMQ_BUILD_DRAFT_API) && ZMQ_VERSION >= ZMQ_MAKE_VERSION(4, 2, 1)
24152414
case ZMQ_EVENT_HANDSHAKE_FAILED:
24162415
on_event_handshake_failed(*event, address.c_str());
24172416
break;
24182417
case ZMQ_EVENT_HANDSHAKE_SUCCEED:
24192418
on_event_handshake_succeed(*event, address.c_str());
24202419
break;
2421-
#endif
24222420
#endif
24232421
default:
24242422
on_event_unknown(*event, address.c_str());

0 commit comments

Comments
 (0)