Changeset 1476 for pjproject


Ignore:
Timestamp:
Oct 5, 2007 6:41:04 AM (17 years ago)
Author:
bennylp
Message:

Related to ticket #95: bug in TLS transport: keep-alive timer is not cancelled when transport is destroyed

Location:
pjproject/trunk/pjsip/src/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c

    r1473 r1476  
    663663    /* Mark transport as closing */ 
    664664    tcp->is_closing = PJ_TRUE; 
     665 
     666    /* Stop keep-alive timer. */ 
     667    if (tcp->ka_timer.id) { 
     668        pjsip_endpt_cancel_timer(tcp->listener->endpt, &tcp->ka_timer); 
     669        tcp->ka_timer.id = PJ_FALSE; 
     670    } 
    665671 
    666672    /* Cancel all delayed transmits */ 
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c

    r1473 r1476  
    13981398    ++tls->is_closing; 
    13991399 
     1400    /* Stop keep-alive timer. */ 
     1401    if (tls->ka_timer.id) { 
     1402        pjsip_endpt_cancel_timer(tls->listener->endpt, &tls->ka_timer); 
     1403        tls->ka_timer.id = PJ_FALSE; 
     1404    } 
     1405 
    14001406    /* Cancel all delayed transmits */ 
    14011407    while (!pj_list_empty(&tls->delayed_list)) { 
     
    19581964        SSL_shutdown(tls->ssl); 
    19591965        tls->ssl_shutdown_called = PJ_TRUE; 
     1966 
     1967        /* Stop keep-alive timer. */ 
     1968        if (tls->ka_timer.id) { 
     1969            pjsip_endpt_cancel_timer(tls->listener->endpt, &tls->ka_timer); 
     1970            tls->ka_timer.id = PJ_FALSE; 
     1971        } 
    19601972 
    19611973        PJ_LOG(4,(transport->obj_name, "TLS transport shutdown")); 
Note: See TracChangeset for help on using the changeset viewer.