Ticket #1865 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Main thread blocked by NAT type detection in library start

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.4.5
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by nanang) (diff)

Currently pjsua_start() will automatically start NAT type detection, it may block the application UI/main thread (the thread calling pjsua_start(), usually it is the UI/main thread), when the configured STUN server is down.

So, let's just perform NAT type detection only after STUN server resolution is succeeded. Also, make the library starting NAT type detection only when pjsua_config.nat_type_in_sdp is set to non-zero.

Change History

comment:1 Changed 3 years ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5127:

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

comment:2 Changed 3 years ago by nanang

  • Description modified (diff)
Note: See TracTickets for help on using tickets.