From 61581afcc9511456a3aa1e01d0d2b3789cfb44d3 Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Tue, 28 Jul 2026 10:14:30 -0400 Subject: [PATCH] Increase receive timeout from 50ms to 1000ms in synchronous_query_relays_with_progress The 50ms receive timeout was too short for relays that need time to process a REQ query before responding. The pool's query_sync already uses 1000ms. This matches that behavior to avoid premature timeouts. --- nostr_core/core_relays.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nostr_core/core_relays.c b/nostr_core/core_relays.c index e30ca32e..8ecda543 100644 --- a/nostr_core/core_relays.c +++ b/nostr_core/core_relays.c @@ -195,9 +195,10 @@ cJSON** synchronous_query_relays_with_progress( continue; } - // Try to receive message (short timeout to keep UI responsive) + // Try to receive message (1000ms timeout to allow relay time + // to respond — matches nostr_relay_pool_query_sync behavior) char buffer[262144]; - int len = nostr_ws_receive(relay->client, buffer, sizeof(buffer)-1, 50); + int len = nostr_ws_receive(relay->client, buffer, sizeof(buffer)-1, 1000); if (len > 0) { buffer[len] = '\0';