Changeset 4661


Ignore:
Timestamp:
Nov 29, 2013 12:33:05 AM (11 years ago)
Author:
bennylp
Message:

Fixed #1714: Workaround for stuck in TCP/TLS shutdown when another thread is destroying the transport

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

Legend:

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

    r4537 r4661  
    177177        tcp->close_reason = status; 
    178178 
    179     if (tcp->base.is_shutdown) 
     179    if (tcp->base.is_shutdown || tcp->base.is_destroying) 
    180180        return; 
    181181 
     
    195195        (*state_cb)(&tcp->base, PJSIP_TP_STATE_DISCONNECTED, &state_info); 
    196196    } 
     197 
     198    /* check again */ 
     199    if (tcp->base.is_shutdown || tcp->base.is_destroying) 
     200        return; 
    197201 
    198202    /* We can not destroy the transport since high level objects may 
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c

    r4537 r4661  
    184184        tls->close_reason = status; 
    185185 
    186     if (tls->base.is_shutdown) 
     186    if (tls->base.is_shutdown || tls->base.is_destroying) 
    187187        return; 
    188188 
     
    214214        (*state_cb)(&tls->base, PJSIP_TP_STATE_DISCONNECTED, &state_info); 
    215215    } 
     216 
     217    /* check again */ 
     218    if (tls->base.is_shutdown || tls->base.is_destroying) 
     219        return; 
    216220 
    217221    /* We can not destroy the transport since high level objects may 
Note: See TracChangeset for help on using the changeset viewer.