summaryrefslogtreecommitdiff
path: root/ace/Service_Manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Service_Manager.cpp')
-rw-r--r--ace/Service_Manager.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp
index 6c1df9b23c5..3fdf1b5eb73 100644
--- a/ace/Service_Manager.cpp
+++ b/ace/Service_Manager.cpp
@@ -7,6 +7,7 @@
#include "ace/Service_Config.h"
#include "ace/Service_Manager.h"
#include "ace/Reactor.h"
+#include "ace/WFMO_Reactor.h"
#if !defined (__ACE_INLINE__)
#include "ace/Service_Manager.i"
@@ -205,7 +206,23 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
{
ACE_TRACE ("ACE_Service_Manager::handle_input");
- if (this->acceptor_.accept (this->client_stream_) == -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 *> (ACE_Reactor::instance ()->implementation ()))
+ reset_new_handle = 1;
+#endif /* ACE_WIN32 */
+
+ if (this->acceptor_.accept (this->client_stream_, // stream
+ 0, // remote address
+ 0, // timeout
+ 1, // restart
+ reset_new_handle // reset new handler
+ ) == -1)
return -1;
if (this->debug_)