Created
October 5, 2021 06:03
-
-
Save sminnee/74e991fd8233232d74c204b0fee6e305 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/connector.ts b/src/connector.ts | |
index c0aeaab0..2f0ecc99 100644 | |
--- a/src/connector.ts | |
+++ b/src/connector.ts | |
@@ -70,9 +70,7 @@ export default class Connector extends SocketClient { | |
onLogin = () => { | |
console.log('app.on login reconnect') | |
- if (this.multiplayerActive) { | |
- this.reconnect() | |
- } | |
+ this.reconnect() | |
this.grid.reconnect() | |
} | |
@@ -93,6 +91,12 @@ export default class Connector extends SocketClient { | |
this.connect() | |
} | |
+ reconnect() { | |
+ if (this.multiplayerActive) { | |
+ super.reconnect() | |
+ } | |
+ } | |
+ | |
get name() { | |
return this.persona.user ? this.persona.user.name : 'anon' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment