Releasing new design #161

Merged
b merged 241 commits from staging into main 2024-08-21 11:38:25 +00:00
Showing only changes of commit 2f1423a35a - Show all commits

View File

@ -121,7 +121,7 @@ export class RelayController {
return new Promise<void>((resolve) => { return new Promise<void>((resolve) => {
if (!relay.connected) { if (!relay.connected) {
console.log(`${relay.url} : Not connected!`, 'Skipping subscription') console.log(`${relay.url} : Not connected!`, 'Skipping subscription')
return return resolve()
} }
// Subscribe to the relay with the specified filter // Subscribe to the relay with the specified filter
@ -140,6 +140,14 @@ export class RelayController {
resolve() // Resolve the promise when EOSE is received resolve() // Resolve the promise when EOSE is received
} }
}) })
// add a 30 sec of timeout to subscription
setTimeout(() => {
if (!sub.closed) {
sub.close()
resolve()
}
}, 30 * 1000)
}) })
}) })