You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: zmq.hpp
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1058,18 +1058,17 @@ namespace zmq
1058
1058
1059
1059
voidadd (zmq::socket_t &socket, short events, handler_t handler)
1060
1060
{
1061
-
if (!socket)
1062
-
throwerror_t ();
1063
-
handler_t *handler_ptr = nullptr;
1064
-
/// \todo is it sensible to allow handler to be empty? doesn't this lead to an error when the event is signalled? (perhaps it should already lead to an error in zmq_poller_add then)
1065
-
if (handler) {
1066
-
auto emplace_res = handlers.emplace (socket.ptr, std::move (handler));
1067
-
handler_ptr = &emplace_res.first->second;
1068
-
}
1069
-
if (0 == zmq_poller_add (poller_ptr, socket.ptr, handler_ptr, events)) {
0 commit comments