Created attachment 108093 [details]
See summary and the attached log. What seems to happen here is that:
- the STUN server replies with a broken reply very fast (line 66)
- then gathering candidates finished (line 73)
- then local candidates reply (line 87, 115, etc)
Later it then tries to communicate with the other side, but the nice agent never finishes setup (line 461 and following).
When just removing the STUN server, everything works fine. I would expect libnice to do the same if the STUN server sends broken replies :)
Indeed, we should wait until the nice_agent_gather_candidates() return before allowing the gathering-done signal to be emitted... This is caused by the STUN error coming on another thread and we no longer hold the global lock while emiting signals since 0.1.8.
Migrated to Phabricator: http://phabricator.freedesktop.org/T109