Fixing disconnection taking ~15 seconds
authorDavid Négrier <d.negrier@thecodingmachine.com>
Fri, 5 Jun 2020 11:07:18 +0000 (13:07 +0200)
committerDavid Négrier <d.negrier@thecodingmachine.com>
Fri, 5 Jun 2020 11:07:18 +0000 (13:07 +0200)
commit96c5d92c467214dd11ceaee22843a43a0e7daa7d
tree1bc3812993380f44d3aaf0cb0303cc2946c2b674
parentb82b13e35195c56fd527938eaf5fc052ca5c934a
Fixing disconnection taking ~15 seconds

Most of the time, sending a disconnect event to one of the players is enough (the player will close the connection
which will be shut for the other player).
However! In the rare case where the WebRTC connection is not yet established, if we close the connection on one of the player,
the other player will try connecting until a timeout happens (during this time, the circle with the name is displayed for nothing).

So now, we send disconnection event to every body (not only the people in the group, but also to the person leaving the group)
back/src/Controller/IoSocketController.ts
front/src/Connection.ts
front/src/WebRtc/SimplePeer.ts