diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-29 16:26:53 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-29 16:26:53 +0000 |
commit | fe9d3c146bf4cffc29607cf56d78cd917331e655 (patch) | |
tree | f9e9684abcda93d4263775c8bc141ceec6f094d2 /examples/Logger | |
parent | dc2da40a95be71622c1b01fbb89c6ac28ab7446a (diff) | |
download | ATCD-fe9d3c146bf4cffc29607cf56d78cd917331e655.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples/Logger')
-rw-r--r-- | examples/Logger/simple-server/Logging_Acceptor.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/examples/Logger/simple-server/Logging_Acceptor.cpp b/examples/Logger/simple-server/Logging_Acceptor.cpp index c0e5a061bb7..eec370f15f8 100644 --- a/examples/Logger/simple-server/Logging_Acceptor.cpp +++ b/examples/Logger/simple-server/Logging_Acceptor.cpp @@ -3,6 +3,7 @@ #include "Logging_Acceptor.h" #include "Logging_Handler.h" #include "Reactor_Singleton.h" +#include "ace/WFMO_Reactor.h" // Initialize peer_acceptor object. @@ -56,7 +57,23 @@ Logging_Acceptor::handle_input (ACE_HANDLE) // Accept the connection from a client client daemon. - if (this->peer_acceptor_.accept (svc_handler->peer ()) == -1 + int reset_new_handle = 0; +#if defined (ACE_WIN32) + // Try to find out if the implementation of the reactor that we are + // using is the WFMO_Reactor. If so we need to reset the event + // association for the newly created handle. This is because the + // newly created handle will inherit the properties of the listen + // handle, including its event associations. + if (dynamic_cast <ACE_WFMO_Reactor *> (this->reactor ()->implementation ())) + reset_new_handle = 1; +#endif /* ACE_WIN32 */ + + if (this->peer_acceptor_.accept (svc_handler->peer (), // stream + 0, // remote address + 0, // timeout + 1, // restart + reset_new_handle // reset new handler + ) == -1 || svc_handler->open () == -1) { svc_handler->close (); |