Skip to content
Extraits de code Groupes Projets
Valider 931eb721 rédigé par Will Hunt's avatar Will Hunt
Parcourir les fichiers

Don't block on destroy

parent f9429081
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -65,11 +65,9 @@ export class DiscordClientFactory { ...@@ -65,11 +65,9 @@ export class DiscordClientFactory {
await client.login(token); await client.login(token);
const id = client.user.id; const id = client.user.id;
try {
await client.destroy(); // This can be done asynchronously, because we don't need to block to return the id.
} catch (err) { client.destroy().catch((err) => {
log.warn("Failed to destroy client ", id);
}
log.warn("Failed to destroy client ", id); log.warn("Failed to destroy client ", id);
}); });
return id; return id;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter