mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-11-14 23:41:40 +00:00
Add a delay to calling client.disconnect as a workaround for it being called too early and websocket connection not being established.
This commit is contained in:
parent
d8104cd70d
commit
b04ba0b100
@ -127,7 +127,9 @@ async function run() {
|
||||
const client = new Client(username, password);
|
||||
await client.connect();
|
||||
data.state = client.getState;
|
||||
await client.disconnect();
|
||||
setTimeout(async () => {
|
||||
await client.disconnect();
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
log.verbose("Failed to log in as new user, perhaps the password is wrong?");
|
||||
log.silly(err);
|
||||
|
Loading…
Reference in New Issue
Block a user