summaryrefslogtreecommitdiff
path: root/src/zmq_listener_init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zmq_listener_init.cpp')
-rw-r--r--src/zmq_listener_init.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zmq_listener_init.cpp b/src/zmq_listener_init.cpp
index 98a3780..756e9d8 100644
--- a/src/zmq_listener_init.cpp
+++ b/src/zmq_listener_init.cpp
@@ -93,8 +93,11 @@ void zmq::zmq_listener_init_t::flush ()
void zmq::zmq_listener_init_t::detach ()
{
- // TODO: Engine is closing down. Init object is to be closed as well.
- zmq_assert (false);
+ // This function is called by engine when disconnection occurs.
+ // The engine will destroy itself, so we just drop the pointer here and
+ // start termination of the init object.
+ engine = NULL;
+ term ();
}
void zmq::zmq_listener_init_t::process_plug ()