fix: load blocking by network await (#1989)

This commit is contained in:
Mo
2022-11-09 14:25:32 -06:00
committed by GitHub
parent 0275afc99e
commit 3498130bfb
2 changed files with 8 additions and 4 deletions

View File

@@ -124,7 +124,6 @@ export class SNSessionManager extends AbstractService<SessionEvent> implements S
if (rawSession) {
const session = SessionFromRawStorageValue(rawSession)
this.setSession(session, false)
await this.webSocketsService.startWebSocketConnection()
}
}
@@ -132,6 +131,8 @@ export class SNSessionManager extends AbstractService<SessionEvent> implements S
this.httpService.setAuthorizationToken(session.authorizationValue)
this.apiService.setSession(session, persist)
void this.webSocketsService.startWebSocketConnection()
}
public online() {
@@ -625,8 +626,6 @@ export class SNSessionManager extends AbstractService<SessionEvent> implements S
this.httpService.setHost(host)
this.setSession(session)
await this.webSocketsService.startWebSocketConnection()
}
private async handleAuthResponse(body: UserRegistrationResponseBody, rootKey: SNRootKey, wrappingKey?: SNRootKey) {