From f5ca1ac19a529245ba67e45bd0f31687ac14e3d7 Mon Sep 17 00:00:00 2001 From: schmidt Date: Sun, 22 Mar 2009 15:07:27 +0000 Subject: ChangeLogTag:Fri --- ACE/ace/Acceptor.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ACE/ace/Acceptor.cpp') diff --git a/ACE/ace/Acceptor.cpp b/ACE/ace/Acceptor.cpp index 1b708cbe7cd..b4e7784a4a1 100644 --- a/ACE/ace/Acceptor.cpp +++ b/ACE/ace/Acceptor.cpp @@ -287,7 +287,18 @@ ACE_Acceptor::accept_svc_handler // 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 const reset_new_handle; + + if (reactor) + reset_new_handle = reactor->uses_event_associations (); + else + { + // Acceptor is closed, so reject this call + errno = EINVAL; + return -1; + } if (this->acceptor ().accept (svc_handler->peer (), // stream 0, // remote address -- cgit v1.2.1