OpalConnection doesn't responsible for release another (pair) connection, because OpalCall release all their connections itself.
Current behaviar can lead to deadlocks. This patch fix it.
I am sorry but I am really very, very uncomfortable with changing this code. This has been a very complex area and change many times over the years already.
While it might be fixing your particular problem, there are a number of other use cases which could be broken by it. For example, does it still work when doing "internal transfers" for mixers (3 way conf calls in OpenPhone) or when playing a sound file using IVR endpoint, etc.
Perhaps if you rais e bug report and can explain how the deadlock occurred we can look at the root problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Better release handling in OpalCall.
I am sorry but I am really very, very uncomfortable with changing this code. This has been a very complex area and change many times over the years already.
While it might be fixing your particular problem, there are a number of other use cases which could be broken by it. For example, does it still work when doing "internal transfers" for mixers (3 way conf calls in OpenPhone) or when playing a sound file using IVR endpoint, etc.
Perhaps if you rais e bug report and can explain how the deadlock occurred we can look at the root problem?