diff options
author | click <none@none> | 2010-11-04 05:30:29 +0100 |
---|---|---|
committer | click <none@none> | 2010-11-04 05:30:29 +0100 |
commit | 9b16ee203f3f8e6e21c4864bd3308bf58c7b6800 (patch) | |
tree | 14950af01860fc520bbbd320c7ad81ef0281cbf3 /dep/acelite/ace/Connector.cpp | |
parent | 2604250c3c4efd93e9977f2eb72d6398a7a7bcb2 (diff) |
Dep/ACE: Upgrade ACE -library to 5.8.3
--HG--
branch : trunk
Diffstat (limited to 'dep/acelite/ace/Connector.cpp')
-rw-r--r-- | dep/acelite/ace/Connector.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/dep/acelite/ace/Connector.cpp b/dep/acelite/ace/Connector.cpp index 820ca875c16..3a1edfc881a 100644 --- a/dep/acelite/ace/Connector.cpp +++ b/dep/acelite/ace/Connector.cpp @@ -1,4 +1,4 @@ -// $Id: Connector.cpp 89510 2010-03-17 12:21:14Z vzykov $ +// $Id: Connector.cpp 91527 2010-08-27 15:03:31Z shuston $ #ifndef ACE_CONNECTOR_CPP #define ACE_CONNECTOR_CPP @@ -121,9 +121,9 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::close (SVC_HANDLER *&sh) return false; // Remove from Reactor. - if (this->reactor ()->remove_handler ( + if (-1 == this->reactor ()->remove_handler ( h, - ACE_Event_Handler::ALL_EVENTS_MASK) == -1) + ACE_Event_Handler::ALL_EVENTS_MASK | ACE_Event_Handler::DONT_CALL)) return false; } @@ -174,6 +174,20 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_input (ACE_HANDLE) } template <class SVC_HANDLER> int +ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask m) +{ + // epoll on Linux will, at least sometimes, return EPOLLERR when a connect + // fails, triggering a total removal from the reactor. This is different from + // select()-based systems which select the fd for read on a connect failure. + // So just call handle_input() to rejoin common handling for a failed + // connect. + if (m == ACE_Event_Handler::ALL_EVENTS_MASK) + return this->handle_input (handle); + return -1; +} + +template <class SVC_HANDLER> int ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_output (ACE_HANDLE handle) { // Called when a connection is establishment asynchronous. |