fix: startup relay race condition
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Kieran 2023-11-02 07:24:57 +09:00
parent d4bf929e60
commit f252087f6b
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,8 @@ export async function updateRelayConnections(system: SystemInterface, relays: Re
system.ConnectToRelay(SINGLE_RELAY, { read: true, write: true });
} else {
for (const [k, v] of Object.entries(relays)) {
await system.ConnectToRelay(k, v);
// note: don't awit this, causes race condition with sending requests to relays
system.ConnectToRelay(k, v);
}
for (const v of system.Sockets) {
if (!relays[v.address] && !v.ephemeral) {