Merge pull request #631 from egecetin/master

Add on_monitor_stopped function for monitor_t
This commit is contained in:
Gudmundur Adalsteinsson 2024-08-12 16:41:07 +00:00 committed by GitHub
commit 23cd83e83b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2387,6 +2387,8 @@ class monitor_t
_socket = socket_ref(); _socket = socket_ref();
} }
virtual void on_monitor_stopped() {}
#endif #endif
virtual void on_monitor_started() {} virtual void on_monitor_started() {}
virtual void on_event_connected(const zmq_event_t &event_, const char *addr_) virtual void on_event_connected(const zmq_event_t &event_, const char *addr_)
@ -2528,6 +2530,7 @@ class monitor_t
#ifdef ZMQ_EVENT_MONITOR_STOPPED #ifdef ZMQ_EVENT_MONITOR_STOPPED
if (event->event == ZMQ_EVENT_MONITOR_STOPPED) { if (event->event == ZMQ_EVENT_MONITOR_STOPPED) {
on_monitor_stopped();
return false; return false;
} }