fix: Improve websocket reliability (#1470)

* check connection on page visibility change

* fix: SocketPresence account for socket changing
This commit is contained in:
Tom Moor
2020-08-20 20:37:54 -07:00
committed by GitHub
parent 26c574ab58
commit ec55299c8b
3 changed files with 56 additions and 11 deletions

View File

@@ -41,7 +41,7 @@ export default class SocketPresence extends React.Component<Props> {
}
setupOnce = () => {
if (this.context && !this.previousContext) {
if (this.context && this.context !== this.previousContext) {
this.previousContext = this.context;
if (this.context.authenticated) {