From 6bcced7537473193eb5e2b30655108e7e850b5df Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Tue, 29 Jul 2014 04:16:44 +0800 Subject: [PATCH] use enum retired_fd instead of -1 --- src/socks_connecter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socks_connecter.cpp b/src/socks_connecter.cpp index d290147a..91e11c54 100644 --- a/src/socks_connecter.cpp +++ b/src/socks_connecter.cpp @@ -87,7 +87,7 @@ void zmq::socks_connecter_t::process_term (int linger_) case sending_request: case waiting_for_response: rm_fd (handle); - if (s != -1) + if (s != retired_fd) close (); break; } @@ -227,7 +227,7 @@ void zmq::socks_connecter_t::initiate_connect () } // Handle any other error condition by eventual reconnect. else { - if (s != -1) + if (s != retired_fd) close (); start_timer (); }