*Listen for connections before waiting for ready

This commit is contained in:
Derrick Hammer 2023-02-17 08:20:02 -05:00
parent 72324beb68
commit a7384cf688
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 4 deletions

View File

@ -53,10 +53,6 @@ export class SwarmClient extends Client {
return this._ready;
}
this._ready = this.callModuleReturn("ready", { swarm: this.swarm });
await this._ready;
this.connectModule(
"listenConnections",
{ swarm: this.swarm },
@ -65,6 +61,10 @@ export class SwarmClient extends Client {
}
);
this._ready = this.callModuleReturn("ready", { swarm: this.swarm });
await this._ready;
this._ready = undefined;
}