Added an option to check if the client service is available
parent
6e2e8b0e51
commit
adc942154e
|
@ -105,6 +105,19 @@ export class ClientServices {
|
|||
this.connection.connect();
|
||||
}
|
||||
|
||||
awaitSession() : Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
const unregister = this.events.on("notify_session_initialized", () => {
|
||||
unregister();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
isSessionInitialized() {
|
||||
return this.sessionInitialized;
|
||||
}
|
||||
|
||||
stop() {
|
||||
this.connection.disconnect();
|
||||
clearTimeout(this.retryTimer);
|
||||
|
|
Loading…
Reference in New Issue