avoid unnessary wait on logout

This commit is contained in:
Roland Osborne 2024-09-13 13:43:19 -07:00
parent be9451ad42
commit d575368ba1

View File

@ -82,19 +82,16 @@ export class DatabagSDK {
public async logout(session: Session, all: boolean): Promise<void> {
const sessionModule = session as SessionModule;
const params = await sessionModule.close();
try {
const { node, secure, token } = params;
await clearLogin(node, secure, token, all);
}
catch(err) {
this.log.error(err);
}
try {
await this.store.clearLogin();
}
catch(err) {
this.log.error(err);
}
const { node, secure, token } = params;
clearLogin(node, secure, token, all).then(() => {}).catch(err => {
console.log(err);
});
}
public async configure(node: string, secure: boolean, token: string, mfaCode: string | null): Promise<Node> {