Github user bgaff commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/576#discussion_r60170878 --- Diff: proxy/InkAPI.cc --- @@ -991,7 +991,16 @@ INKContInternal::handle_event(int event, void *edata) Warning("INKCont Deletable but not deleted %d", m_event_count); } } else { - return m_event_func((TSCont)this, (TSEvent)event, edata); + int retval = m_event_func((TSCont)this, (TSEvent)event, edata); + if (edata && event == EVENT_INTERVAL) { + Event *e = reinterpret_cast<Event *>(edata); + if (e->period != 0) { + // In the interval case, we must re-increment the m_event_count for + // the next go around. Otherwise, our event count will go negative. + ink_release_assert(ink_atomic_increment((int *)&this->m_event_count, 1) >- 0); --- End diff -- Pretty sure you mean >= 0.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---