Ignore:
Timestamp:
Jul 6, 2015 8:51:45 AM (9 years ago)
Author:
nanang
Message:

Close #1865: Start NAT type detection after first STUN server resolution succeeds to avoid blocked main thread when STUN server is down.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r5124 r5127  
    165165 
    166166    /* Perform NAT detection */ 
    167     if (pjsua_var.ua_cfg.stun_srv_cnt) { 
    168         status = pjsua_detect_nat_type(); 
    169         if (status != PJ_SUCCESS) { 
    170             PJ_PERROR(1,(THIS_FILE, status, "NAT type detection failed")); 
    171         } 
    172     } 
     167    // Performed only when STUN server resolution by pjsua_init() completed 
     168    // successfully (see ticket #1865). 
     169    //if (pjsua_var.ua_cfg.stun_srv_cnt) { 
     170        //status = pjsua_detect_nat_type(); 
     171        //if (status != PJ_SUCCESS) { 
     172        //    PJ_PERROR(1,(THIS_FILE, status, "NAT type detection failed")); 
     173        //} 
     174    //} 
    173175 
    174176    pj_log_pop_indent(); 
Note: See TracChangeset for help on using the changeset viewer.