mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 11:06:59 +01:00
listener object unregisters its fd correctly
This commit is contained in:
parent
0d5f3ebbda
commit
87655b0b9d
@ -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.
|
||||
io_object_t::plug (io_thread_);
|
||||
|
||||
handle = add_fd (tcp_socket.get_fd ());
|
||||
set_pollin (handle);
|
||||
set_pollout (handle);
|
||||
|
||||
// Flush all the data that may have been already received downstream.
|
||||
in_event ();
|
||||
|
||||
// TODO: Re-plug to the new I/O thread & poller!
|
||||
}
|
||||
|
||||
void zmq::zmq_engine_t::unplug ()
|
||||
|
@ -49,9 +49,10 @@ void zmq::zmq_listener_t::process_plug ()
|
||||
set_pollin (handle);
|
||||
}
|
||||
|
||||
void zmq::zmq_listener_t::process_unplug ()
|
||||
void zmq::zmq_listener_t::process_term ()
|
||||
{
|
||||
rm_fd (handle);
|
||||
own_t::process_term ();
|
||||
}
|
||||
|
||||
void zmq::zmq_listener_t::in_event ()
|
||||
@ -70,5 +71,3 @@ void zmq::zmq_listener_t::in_event ()
|
||||
launch_sibling (init);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace zmq
|
||||
|
||||
// Handlers for incoming commands.
|
||||
void process_plug ();
|
||||
void process_unplug ();
|
||||
void process_term ();
|
||||
|
||||
// Handlers for I/O events.
|
||||
void in_event ();
|
||||
|
Loading…
Reference in New Issue
Block a user