summaryrefslogtreecommitdiff
path: root/ace/Acceptor.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-22 22:06:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-22 22:06:04 +0000
commitaa56341042bf18dfb4754e0910113e8e059acc82 (patch)
tree147fc294556751cc24df552768b29a173a22c924 /ace/Acceptor.cpp
parentf13a60d21d6b6971654b1b2737dd09fafdbef944 (diff)
downloadATCD-aa56341042bf18dfb4754e0910113e8e059acc82.tar.gz
foo
Diffstat (limited to 'ace/Acceptor.cpp')
-rw-r--r--ace/Acceptor.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index d770af37146..79ad80fd9ae 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -170,6 +170,14 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
this->reactor_->remove_handler
(handle, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
+
+ // Shut down the listen socket to recycle the handles.
+ if (this->peer_acceptor_.close () == -1)
+ ACE_ERROR ((LM_ERROR, "close\n"));
+
+ // Set the Reactor to 0 so that we don't try to close down
+ // again.
+ this->reactor (0);
}
return 0;
}
@@ -484,7 +492,7 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDL
{
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
// Guard against multiple closes.
- if (this->creation_strategy_ != 0)
+ if (this->reactor () != 0)
{
ACE_HANDLE handle = this->get_handle ();
@@ -513,6 +521,10 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDL
this->reactor ()->remove_handler
(handle, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
+
+ // Set the Reactor to 0 so that we don't try to close down
+ // again.
+ this->reactor (0);
}
return 0;
}