[ 
https://issues.apache.org/jira/browse/TS-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15247150#comment-15247150
 ] 

ASF GitHub Bot commented on TS-3429:
------------------------------------

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.


> TSContScheduleEvery does not increment event count correctly
> ------------------------------------------------------------
>
>                 Key: TS-3429
>                 URL: https://issues.apache.org/jira/browse/TS-3429
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Bin
>            Assignee: Susan Hinrichs
>             Fix For: 6.2.0
>
>
> TSContScheduleEvery only increments the event count the first time it is 
> scheduled. When the event handler gets invoked, it decrements the event 
> count. So it triggers the assertion at InkAPI.cc:987. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to