*Add close event for when the relay connection closes

This commit is contained in:
Derrick Hammer 2023-03-19 12:00:00 -04:00
parent e48440710e
commit b3e0722364
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 0 deletions

View File

@ -208,6 +208,7 @@ export default class HyperswarmWeb extends EventEmitter {
this._activeRelay.dht._protocol._stream.once("close", () => {
this._activeRelay = undefined;
this._ready = false;
this.emitSelf("close");
});
} while (relays.length > 0 && !this._activeRelay);
}