Commit 87655b0b authored by Martin Sustrik's avatar Martin Sustrik

listener object unregisters its fd correctly

parent 0d5f3ebb
...@@ -62,15 +62,12 @@ void zmq::zmq_engine_t::plug (io_thread_t *io_thread_, i_inout *inout_) ...@@ -62,15 +62,12 @@ void zmq::zmq_engine_t::plug (io_thread_t *io_thread_, i_inout *inout_)
// Connect to I/O threads poller object. // Connect to I/O threads poller object.
io_object_t::plug (io_thread_); io_object_t::plug (io_thread_);
handle = add_fd (tcp_socket.get_fd ()); handle = add_fd (tcp_socket.get_fd ());
set_pollin (handle); set_pollin (handle);
set_pollout (handle); set_pollout (handle);
// Flush all the data that may have been already received downstream. // Flush all the data that may have been already received downstream.
in_event (); in_event ();
// TODO: Re-plug to the new I/O thread & poller!
} }
void zmq::zmq_engine_t::unplug () void zmq::zmq_engine_t::unplug ()
......
...@@ -49,9 +49,10 @@ void zmq::zmq_listener_t::process_plug () ...@@ -49,9 +49,10 @@ void zmq::zmq_listener_t::process_plug ()
set_pollin (handle); set_pollin (handle);
} }
void zmq::zmq_listener_t::process_unplug () void zmq::zmq_listener_t::process_term ()
{ {
rm_fd (handle); rm_fd (handle);
own_t::process_term ();
} }
void zmq::zmq_listener_t::in_event () void zmq::zmq_listener_t::in_event ()
...@@ -70,5 +71,3 @@ void zmq::zmq_listener_t::in_event () ...@@ -70,5 +71,3 @@ void zmq::zmq_listener_t::in_event ()
launch_sibling (init); launch_sibling (init);
} }
...@@ -44,7 +44,7 @@ namespace zmq ...@@ -44,7 +44,7 @@ namespace zmq
// Handlers for incoming commands. // Handlers for incoming commands.
void process_plug (); void process_plug ();
void process_unplug (); void process_term ();
// Handlers for I/O events. // Handlers for I/O events.
void in_event (); void in_event ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment