Skip to content

Commit

Permalink
fix: startup
Browse files Browse the repository at this point in the history
  • Loading branch information
v0l committed Jun 18, 2024
1 parent 3486f0f commit f2b08ce
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions packages/app/src/Cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f2b08ce

Please sign in to comment.