diff options
Diffstat (limited to 'src/tcp_connecter.cpp')
-rw-r--r-- | src/tcp_connecter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index c819f86..8072209 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -74,8 +74,7 @@ xs::tcp_connecter_t::~tcp_connecter_t () if (handle) rm_fd (handle); - if (s != retired_fd) - close (); + close (); } void xs::tcp_connecter_t::process_plug () @@ -301,7 +300,9 @@ xs::fd_t xs::tcp_connecter_t::connect () void xs::tcp_connecter_t::close () { - xs_assert (s != retired_fd); + if (s == retired_fd) + return; + #ifdef XS_HAVE_WINDOWS int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); |