Compare commits
2 Commits
21fb795488
...
6a843447b1
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 6a843447b1 | |
Derrick Hammer | cc7c7c8edf |
|
@ -53,7 +53,7 @@ export default class HyperswarmWeb extends EventEmitter {
|
||||||
this._activeRelay.on("close", () => {
|
this._activeRelay.on("close", () => {
|
||||||
this._activeRelay = undefined;
|
this._activeRelay = undefined;
|
||||||
});
|
});
|
||||||
} while (relays.length > 0);
|
} while (relays.length > 0 && !this._activeRelay);
|
||||||
if (!this._activeRelay) {
|
if (!this._activeRelay) {
|
||||||
throw new Error("Failed to find an available relay");
|
throw new Error("Failed to find an available relay");
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ export default class HyperswarmWeb extends EventEmitter {
|
||||||
this._activeRelay.on("close", () => {
|
this._activeRelay.on("close", () => {
|
||||||
this._activeRelay = undefined;
|
this._activeRelay = undefined;
|
||||||
});
|
});
|
||||||
} while (relays.length > 0);
|
} while (relays.length > 0 && !this._activeRelay);
|
||||||
|
|
||||||
if (!this._activeRelay) {
|
if (!this._activeRelay) {
|
||||||
throw new Error("Failed to find an available relay");
|
throw new Error("Failed to find an available relay");
|
||||||
|
|
Loading…
Reference in New Issue