diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-01-03 01:18:40 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-01-03 01:18:40 +0000 |
commit | 13f40ac81bc30f0c100ca79acb0d94e2fa50a36c (patch) | |
tree | 6a9a4286e6d58bb53951e504d3819a0740af1b85 /ace/Asynch_Acceptor.cpp | |
parent | 578af6967c37f53c73e874945bfdf9342a2133cf (diff) | |
download | ATCD-13f40ac81bc30f0c100ca79acb0d94e2fa50a36c.tar.gz |
ChangeLogTag:Tue Jan 2 14:22:21 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Asynch_Acceptor.cpp')
-rw-r--r-- | ace/Asynch_Acceptor.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp index 1da5c30086d..c32b8b330ed 100644 --- a/ace/Asynch_Acceptor.cpp +++ b/ace/Asynch_Acceptor.cpp @@ -1,3 +1,4 @@ +/* -*- C++ -*- */ // $Id$ #ifndef ACE_ASYNCH_ACCEPTOR_C @@ -183,8 +184,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re int error = 0; // If the asynchronous accept fails. - if (!error && - !result.success ()) + if (!result.success () || + result.accept_handle() == ACE_INVALID_HANDLE ) { error = 1; ACE_ERROR ((LM_ERROR, @@ -268,7 +269,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re } // On failure, no choice but to close the socket - if (error) + if (error && + result.accept_handle() != ACE_INVALID_HANDLE ) ACE_OS::closesocket (result.accept_handle ()); // Delete the dynamically allocated message_block @@ -300,7 +302,10 @@ ACE_Asynch_Acceptor<HANDLER>::cancel (void) || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530))) return (int) ::CancelIo (this->listen_handle_); #else - ACE_NOTSUP_RETURN (-1); + //ACE_NOTSUP_RETURN (-1); + // Supported now + return this->asynch_accept_.cancel(); + #endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && ((defined (_MSC_VER) && (_MSC_VER > 1020)) || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530))) */ } |