mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 02:53:12 +01:00
Problem: process_term and close duplicated across subclasses of stream_connecter_base_t
Solution: pull up
This commit is contained in:
@@ -62,23 +62,6 @@ zmq::ipc_connecter_t::ipc_connecter_t (class io_thread_t *io_thread_,
|
||||
zmq_assert (_addr->protocol == protocol_name::ipc);
|
||||
}
|
||||
|
||||
void zmq::ipc_connecter_t::process_term (int linger_)
|
||||
{
|
||||
if (_reconnect_timer_started) {
|
||||
cancel_timer (reconnect_timer_id);
|
||||
_reconnect_timer_started = false;
|
||||
}
|
||||
|
||||
if (_handle) {
|
||||
rm_handle ();
|
||||
}
|
||||
|
||||
if (_s != retired_fd)
|
||||
close ();
|
||||
|
||||
own_t::process_term (linger_);
|
||||
}
|
||||
|
||||
void zmq::ipc_connecter_t::in_event ()
|
||||
{
|
||||
// We are not polling for incoming data, so we are actually called
|
||||
@@ -180,16 +163,6 @@ int zmq::ipc_connecter_t::open ()
|
||||
return -1;
|
||||
}
|
||||
|
||||
int zmq::ipc_connecter_t::close ()
|
||||
{
|
||||
zmq_assert (_s != retired_fd);
|
||||
int rc = ::close (_s);
|
||||
errno_assert (rc == 0);
|
||||
_socket->event_closed (_endpoint, _s);
|
||||
_s = retired_fd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
zmq::fd_t zmq::ipc_connecter_t::connect ()
|
||||
{
|
||||
// Following code should handle both Berkeley-derived socket
|
||||
|
||||
Reference in New Issue
Block a user