Commit 6bcced75 authored by KIU Shueng Chuan's avatar KIU Shueng Chuan

use enum retired_fd instead of -1

parent ac99d50a
...@@ -87,7 +87,7 @@ void zmq::socks_connecter_t::process_term (int linger_) ...@@ -87,7 +87,7 @@ void zmq::socks_connecter_t::process_term (int linger_)
case sending_request: case sending_request:
case waiting_for_response: case waiting_for_response:
rm_fd (handle); rm_fd (handle);
if (s != -1) if (s != retired_fd)
close (); close ();
break; break;
} }
...@@ -227,7 +227,7 @@ void zmq::socks_connecter_t::initiate_connect () ...@@ -227,7 +227,7 @@ void zmq::socks_connecter_t::initiate_connect ()
} }
// Handle any other error condition by eventual reconnect. // Handle any other error condition by eventual reconnect.
else { else {
if (s != -1) if (s != retired_fd)
close (); close ();
start_timer (); start_timer ();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment