Compare commits
2 Commits
72324beb68
...
54a817742c
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 54a817742c | |
Derrick Hammer | a7384cf688 |
|
@ -39,11 +39,11 @@ export class SwarmClient extends Client {
|
|||
if (this._ready) {
|
||||
return this._ready;
|
||||
}
|
||||
this._ready = this.callModuleReturn("ready", { swarm: this.swarm });
|
||||
await this._ready;
|
||||
this.connectModule("listenConnections", { swarm: this.swarm }, async (socketId) => {
|
||||
this.emit("connection", await createSocket(socketId));
|
||||
});
|
||||
this._ready = this.callModuleReturn("ready", { swarm: this.swarm });
|
||||
await this._ready;
|
||||
this._ready = undefined;
|
||||
}
|
||||
async start() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue