Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer 8427cbdff6
*Update dist 2023-02-17 16:32:55 -05:00
Derrick Hammer e8a44315a8
*Need to hook to the stream directly 2023-02-17 16:32:39 -05:00
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -131,7 +131,7 @@ export default class HyperswarmWeb extends EventEmitter {
dht: new DhtNode(new Stream(true, new WebSocket(connection)), this._options),
keyPair: this._options.keyPair,
});
this._activeRelay.on("close", () => {
this._activeRelay.dht._protocol._stream.once("close", () => {
this._activeRelay = undefined;
this._ready = false;
});

View File

@ -193,7 +193,7 @@ export default class HyperswarmWeb extends EventEmitter {
keyPair: this._options.keyPair,
});
this._activeRelay.on("close", () => {
this._activeRelay.dht._protocol._stream.once("close", () => {
this._activeRelay = undefined;
this._ready = false;
});