Fixing connection closing
This commit is contained in:
parent
e1193ad95a
commit
1061c80f1f
2 changed files with 6 additions and 1 deletions
|
@ -951,7 +951,7 @@ export class GameScene extends Phaser.Scene implements CenterListener {
|
|||
});
|
||||
|
||||
const nextSceneKey = this.checkToExit();
|
||||
if(nextSceneKey){
|
||||
if (nextSceneKey) {
|
||||
// We are completely destroying the current scene to avoid using a half-backed instance when coming back to the same map.
|
||||
this.connection.closeConnection();
|
||||
this.simplePeer.unregister();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue