Skip to content

Commit 4aa19d1

Browse files
committed
Fix logic reversal for target_session_attrs=primary|standby
1 parent a848ca6 commit 4aa19d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
745745
return (
746746
(x === 'read-write' && xs.default_transaction_read_only === 'on') ||
747747
(x === 'read-only' && xs.default_transaction_read_only === 'off') ||
748-
(x === 'primary' && xs.in_hot_standby === 'off') ||
749-
(x === 'standby' && xs.in_hot_standby === 'on') ||
748+
(x === 'primary' && xs.in_hot_standby === 'on') ||
749+
(x === 'standby' && xs.in_hot_standby === 'off') ||
750750
(x === 'prefer-standby' && xs.in_hot_standby === 'off' && options.host[retries])
751751
)
752752
}

0 commit comments

Comments
 (0)