mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 11:06:52 +01:00
Problem: rm_fd code duplicated across stream_connecter_t subclasses
Solution: pull up tcp_connecter_t::rm_handle and use in all subclasses
This commit is contained in:
@@ -70,8 +70,7 @@ void zmq::ipc_connecter_t::process_term (int linger_)
|
||||
}
|
||||
|
||||
if (_handle) {
|
||||
rm_fd (_handle);
|
||||
_handle = static_cast<handle_t> (NULL);
|
||||
rm_handle ();
|
||||
}
|
||||
|
||||
if (_s != retired_fd)
|
||||
@@ -91,8 +90,7 @@ void zmq::ipc_connecter_t::in_event ()
|
||||
void zmq::ipc_connecter_t::out_event ()
|
||||
{
|
||||
fd_t fd = connect ();
|
||||
rm_fd (_handle);
|
||||
_handle = static_cast<handle_t> (NULL);
|
||||
rm_handle ();
|
||||
|
||||
// Handle the error condition by attempt to reconnect.
|
||||
if (fd == retired_fd) {
|
||||
|
||||
Reference in New Issue
Block a user