projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix clocks while playing live game
[vchess.git]
/
client
/
src
/
store.js
diff --git
a/client/src/store.js
b/client/src/store.js
index
a999b0a
..
f95e488
100644
(file)
--- a/
client/src/store.js
+++ b/
client/src/store.js
@@
-39,7
+39,7
@@
export const store =
this.state.user.notify = res.notify;
});
}
this.state.user.notify = res.notify;
});
}
- this.state.conn = new WebSocket(params.socketUrl + "/?sid=" +
this.state.user.
sid);
+ this.state.conn = new WebSocket(params.socketUrl + "/?sid=" +
my
sid);
// Settings initialized with values from localStorage
this.state.settings = {
bcolor: localStorage["bcolor"] || "lichess",
// Settings initialized with values from localStorage
this.state.settings = {
bcolor: localStorage["bcolor"] || "lichess",
@@
-50,6
+50,7
@@
export const store =
sqSize: parseInt(localStorage["sqSize"]),
};
this.socketCloseListener = () => {
sqSize: parseInt(localStorage["sqSize"]),
};
this.socketCloseListener = () => {
+ // Next line may fail at first, but should retry and eventually success (TODO?)
this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid);
};
this.state.conn.onclose = this.socketCloseListener;
this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid);
};
this.state.conn.onclose = this.socketCloseListener;