Fixing reconnect issue
In the case the reconnect event was triggered on "wake-up", the disconnect event was not sent. But because of a bug in the way we handle the setTimeout, the reconnection to the GameScene never happened after we forced the disconnect scene. This fixes the issue.
This commit is contained in:
@@ -325,6 +325,7 @@ export class Connection implements ConnectionInterface {
|
||||
});
|
||||
|
||||
this.getSocket().on(EventMessage.RECONNECT, () => {
|
||||
console.log('Reconnect event triggered');
|
||||
this.connectSocketServer();
|
||||
if (this.lastPositionShared === null) {
|
||||
throw new Error('No last position shared found while reconnecting');
|
||||
|
||||
Reference in New Issue
Block a user