diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-03-06 02:43:25 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-03-06 02:43:25 +0000 |
commit | 2509b0959cd11f9512383eb73d9d929f42e3b493 (patch) | |
tree | 7fce544783d6d55cd4ff0de65d3fa7357dce5b80 /ACE/ace/Select_Reactor_Base.cpp | |
parent | 17ae2c9c114df8e100d80aa058368c768f6a9ed4 (diff) | |
download | ATCD-2509b0959cd11f9512383eb73d9d929f42e3b493.tar.gz |
Tue Mar 6 02:37:53 UTC 2007 Carlos O'Ryan <coryan@atdeesk.com>
Diffstat (limited to 'ACE/ace/Select_Reactor_Base.cpp')
-rw-r--r-- | ACE/ace/Select_Reactor_Base.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ACE/ace/Select_Reactor_Base.cpp b/ACE/ace/Select_Reactor_Base.cpp index 0306fc7007a..35896b41c09 100644 --- a/ACE/ace/Select_Reactor_Base.cpp +++ b/ACE/ace/Select_Reactor_Base.cpp @@ -640,6 +640,19 @@ ACE_Select_Reactor_Notify::close (void) #if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) notification_queue_.reset(); +#else + // Please see Bug 2820, if we just close the pipe then we break the + // reference counting rules. Basically, all the event handlers + // "stored" in the pipe had their reference counts increased. We + // need to decrease them before closing the pipe.... + ACE_Notification_Buffer b; + for (int r = read_notify_pipe(notification_pipe_.read_handle(), b); + r > 0; + r = read_notify_pipe(notification_pipe_.read_handle(), b)) + { + if (b.eh_ == 0) continue; + b.eh_->remove_reference(); + } #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ return this->notification_pipe_.close (); |