diff options
Diffstat (limited to 'ACE/ace/Dev_Poll_Reactor.cpp')
-rw-r--r-- | ACE/ace/Dev_Poll_Reactor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp index 81bc9091626..97e9d356b2f 100644 --- a/ACE/ace/Dev_Poll_Reactor.cpp +++ b/ACE/ace/Dev_Poll_Reactor.cpp @@ -1320,7 +1320,22 @@ ACE_Dev_Poll_Reactor::dispatch_io_event (Token_Guard &guard) if (info != 0 && info->event_handler == eh) { if (status < 0) - this->remove_handler_i (handle, disp_mask, grd); + { + this->remove_handler_i (handle, disp_mask, grd); +#ifdef ACE_HAS_EVENT_POLL + // epoll-based effectively suspends handlers around the upcall. + // If the handler must be resumed, check to be sure it's the + // same handle/handler combination still. + if (reactor_resumes_eh) + { + info = this->handler_rep_.find (handle); + if (info != 0 && info->event_handler == eh) + { + this->resume_handler_i (handle); + } + } +#endif /* ACE_HAS_EVENT_POLL */ + } } } // Scope close handles eh ref count decrement, if needed. |