fix: Create relay ready promise at connection start
**Motivations :** - Fix timing issue where handshake resolves promise before createProcess waits for it - Ensure promise exists when handshake arrives **Modifications :** - Create relay ready promise immediately when starting connections - Prevents race condition between handshake and createProcess **Pages affectées :** - src/services/service.ts - Fixed promise timing in connectAllRelays
This commit is contained in:
parent
09ef9be8b8
commit
d419a28c2f
@ -478,6 +478,9 @@ export default class Services {
|
||||
const relayUrls = Object.keys(this.relayAddresses);
|
||||
console.log(`🚀 Connecting to ${relayUrls.length} relays in parallel...`);
|
||||
|
||||
// Create the relay ready promise immediately when starting connections
|
||||
this.getRelayReadyPromise();
|
||||
|
||||
// Connect to all relays in parallel
|
||||
const connectionPromises = relayUrls.map(async wsurl => {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user