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:
Simon Giesecke
2019-01-31 09:33:52 -05:00
parent 1a230e89ca
commit 531df586d0
6 changed files with 13 additions and 17 deletions

View File

@@ -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) {