fix: dispose PeerConnection on call end to release ICE ports
All checks were successful
Android Kernel Build / build (push) Successful in 21m43s
All checks were successful
Android Kernel Build / build (push) Successful in 21m43s
close() alone does not free native WebRTC resources (ICE agent, ports, threads). Without dispose() the old PC holds ports for ~30s, blocking the next call from connecting.
This commit is contained in:
@@ -871,7 +871,11 @@ object CallManager {
|
||||
runCatching { localAudioTrack?.setEnabled(false) }
|
||||
runCatching { localAudioTrack?.dispose() }
|
||||
runCatching { audioSource?.dispose() }
|
||||
// close() stops media but does NOT release native resources (ICE agent,
|
||||
// ports, OWTF threads). Without dispose() the old PC keeps ports bound
|
||||
// for ~30 s, blocking the next call from connecting.
|
||||
runCatching { peerConnection?.close() }
|
||||
runCatching { peerConnection?.dispose() }
|
||||
localAudioTrack = null
|
||||
audioSource = null
|
||||
peerConnection = null
|
||||
|
||||
Reference in New Issue
Block a user