summaryrefslogtreecommitdiff
path: root/ACE/ace/Acceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Acceptor.cpp')
-rw-r--r--ACE/ace/Acceptor.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/ACE/ace/Acceptor.cpp b/ACE/ace/Acceptor.cpp
index f78c74882b8..01d6e92c3e2 100644
--- a/ACE/ace/Acceptor.cpp
+++ b/ACE/ace/Acceptor.cpp
@@ -288,7 +288,9 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
bool reset_new_handle;
if (reactor)
- reset_new_handle = reactor->uses_event_associations ();
+ {
+ reset_new_handle = reactor->uses_event_associations ();
+ }
else
{
// Acceptor is closed, so reject this call
@@ -1142,16 +1144,20 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE
// created handle. This is because the newly created handle will
// inherit the properties of the listen handle, including its event
// associations.
- bool const reset_new_handle = this->reactor ()->uses_event_associations ();
+ ACE_Reactor *reactor = this->reactor ();
+ bool reset_new_handle;
// There is a use-case whereby this object will be gone upon return
// from shared_accept - if the Svc_Handler deletes this Oneshot_Acceptor
// during the shared_accept/activation steps. So, do whatever we need
// to do with this object before calling shared_accept.
- if (this->reactor ())
- this->reactor ()->remove_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
+ if (reactor)
+ {
+ reset_new_handle = reactor->uses_event_associations ();
+ reactor->remove_handler
+ (this,
+ ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
+ }
if (this->shared_accept (this->svc_handler_, // stream
0, // remote address