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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user