Investigate SignalingClient already initialized issue
Closed this issue · 2 comments
atsakiridis commented
Check row 33 in TC sheet
Moreover, I'm sporadically getting 'java.lang.RuntimeException: SignalingClient already initialized' exceptions, even when I'm not leaving and going back to the App quickly
atsakiridis commented
Investigated this, but there doesn't seem to be a way to go about it without considerable redesign. Some notes:
- Changed the logic inside SignalingClient so that we keep additional state and if signaling is restarted before it gets a chance to finish then we wait for it to finish first and then try to open() after CLOSE_REPLY arrives. We no longer notify the App of the close reply and wait for the open to finish at which point we tell the App that all is good
- The worked at first, but when you try a call afterwards it fails and the reason is that the new SignalingClient object is in an invalid state and the reason is that the open() happened in the previous SignalingClient object.
- The problem is that we cannot change SignalingClient to static because we need to extend Handler.
I have kept all the progress in case we need it in the future under branch atsakiridis_issue809
atsakiridis commented
Actually let's see if we can provide better error reporting instead of crashing like that