Fix accumulation of socket.close code. Ready to finish Game.js and then the website
[vchess.git] / client / src / views / Hall.vue
index b140e61..a16b5b5 100644 (file)
@@ -154,9 +154,8 @@ export default {
     else //socket not ready yet (initial loading)
       this.st.conn.onopen = funcPollClients;
     this.st.conn.onmessage = this.socketMessageListener;
-    const oldOnclose = this.st.conn.onclose;
     const socketCloseListener = () => {
-      oldOnclose(); //reinitialize connexion (in store.js)
+      store.socketCloseListener(); //reinitialize connexion (in store.js)
       this.st.conn.addEventListener('message', this.socketMessageListener);
       this.st.conn.addEventListener('close', socketCloseListener);
     };