*Add close event for when the relay connection closes
This commit is contained in:
parent
e48440710e
commit
b3e0722364
|
@ -208,6 +208,7 @@ export default class HyperswarmWeb extends EventEmitter {
|
||||||
this._activeRelay.dht._protocol._stream.once("close", () => {
|
this._activeRelay.dht._protocol._stream.once("close", () => {
|
||||||
this._activeRelay = undefined;
|
this._activeRelay = undefined;
|
||||||
this._ready = false;
|
this._ready = false;
|
||||||
|
this.emitSelf("close");
|
||||||
});
|
});
|
||||||
} while (relays.length > 0 && !this._activeRelay);
|
} while (relays.length > 0 && !this._activeRelay);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue