Fix switch to non-blocking mode

This commit is contained in:
Konstantin Knizhnik
2025-03-24 08:17:51 +02:00
parent d7f7d33b0e
commit de0a8d78c2

View File

@@ -727,7 +727,7 @@ pageserver_connect(shardno_t shard_no, int elevel)
* will do fast retries again, with exponential backoff.
*/
shard->delay_us = MIN_RECONNECT_INTERVAL_USEC;
if (!PQsetnonblocking(shard->conn, true) == -1)
if (PQsetnonblocking(shard->conn, true) == -1)
neon_shard_log(shard_no, WARNING, "libpagestore: failed to switch connection to '%s' in non blocking mode: %m", connstr);
neon_shard_log(shard_no, DEBUG5, "Connection state: Connected");