meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

Close mountpoint sockets when leaving relay thread (fixes #3111) #3143

Closed lminiero closed 1 year ago

lminiero commented 1 year ago

This PR closes the sockets used by a mountpoint when leaving the related thread: since a "destroy" request joins the thread, this ensures ports are free once a response is sent. Before, sockets would only be closed in the mountpoint free callback, so when reference counters gave the green light, which could take longer and cause the issue described in #3111.

lminiero commented 1 year ago

Merging.