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.
This commit is contained in:
Laan Tungir
2026-07-28 10:14:30 -04:00
parent 36eb6afa72
commit 61581afcc9
+3 -2
View File
@@ -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';