[FIX] Remove servers offline from server list (#4286)
This commit is contained in:
parent
a5a45f533b
commit
9985e9baf3
|
@ -81,6 +81,7 @@ export async function removeServer({ server }: { server: string }): Promise<void
|
|||
if (userId) {
|
||||
const resume = UserPreferences.getString(`${TOKEN_KEY}-${userId}`);
|
||||
|
||||
try {
|
||||
const sdk = new RocketchatClient({ host: server, protocol: 'ddp', useSsl: isSsl(server) });
|
||||
await sdk.login({ resume });
|
||||
|
||||
|
@ -90,6 +91,9 @@ export async function removeServer({ server }: { server: string }): Promise<void
|
|||
}
|
||||
|
||||
await sdk.logout();
|
||||
} catch (e) {
|
||||
log(e);
|
||||
}
|
||||
}
|
||||
|
||||
await removeServerData({ server });
|
||||
|
|
Loading…
Reference in New Issue