fix: startup
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
kieran 2024-06-18 11:11:45 +01:00
parent 3486f0f8fb
commit f2b08ce3a7
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -30,14 +30,20 @@ async function tryUseCacheRelay(url: string) {
}
export async function initRelayWorker() {
if (!cacheRelay) {
let conn = await tryUseCacheRelay("ws://localhost:4869");
if (!conn) {
conn = await tryUseCacheRelay("ws://umbrel:4848");
try {
if (!cacheRelay) {
let conn = await tryUseCacheRelay("ws://localhost:4869");
if (!conn) {
conn = await tryUseCacheRelay("ws://umbrel:4848");
}
if (conn) return;
} else if (Relay instanceof ConnectionCacheRelay) {
await Relay.connection.connect(true);
return;
}
if (conn) return;
} else if (Relay instanceof ConnectionCacheRelay) {
await Relay.connection.connect();
} catch (e) {
console.error(e);
}
try {