forked from mystiq/hydrogen-web
don't assume setting up a session went all the way through when stopping
This commit is contained in:
parent
a1ba5d7dba
commit
e751333bbd
1 changed files with 10 additions and 4 deletions
|
@ -237,10 +237,16 @@ export class SessionContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
this._reconnectSubscription();
|
if (this._reconnectSubscription) {
|
||||||
this._reconnectSubscription = null;
|
this._reconnectSubscription();
|
||||||
this._sync.stop();
|
this._reconnectSubscription = null;
|
||||||
this._session.stop();
|
}
|
||||||
|
if (this._sync) {
|
||||||
|
this._sync.stop();
|
||||||
|
}
|
||||||
|
if (this._session) {
|
||||||
|
this._session.stop();
|
||||||
|
}
|
||||||
if (this._waitForFirstSyncHandle) {
|
if (this._waitForFirstSyncHandle) {
|
||||||
this._waitForFirstSyncHandle.dispose();
|
this._waitForFirstSyncHandle.dispose();
|
||||||
this._waitForFirstSyncHandle = null;
|
this._waitForFirstSyncHandle = null;
|
||||||
|
|
Loading…
Reference in a new issue