mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +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:
@@ -72,8 +72,7 @@ void zmq::tipc_connecter_t::process_term (int linger_)
|
||||
}
|
||||
|
||||
if (_handle) {
|
||||
rm_fd (_handle);
|
||||
_handle = static_cast<handle_t> (NULL);
|
||||
rm_handle ();
|
||||
}
|
||||
|
||||
if (_s != retired_fd)
|
||||
@@ -93,8 +92,7 @@ void zmq::tipc_connecter_t::in_event ()
|
||||
void zmq::tipc_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