Skip to content

Commit

Permalink
Fix logic reversal for target_session_attrs=primary|standby
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Jan 3, 2023
1 parent a848ca6 commit 4aa19d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
return (
(x === 'read-write' && xs.default_transaction_read_only === 'on') ||
(x === 'read-only' && xs.default_transaction_read_only === 'off') ||
(x === 'primary' && xs.in_hot_standby === 'off') ||
(x === 'standby' && xs.in_hot_standby === 'on') ||
(x === 'primary' && xs.in_hot_standby === 'on') ||
(x === 'standby' && xs.in_hot_standby === 'off') ||
(x === 'prefer-standby' && xs.in_hot_standby === 'off' && options.host[retries])
)
}
Expand Down

0 comments on commit 4aa19d1

Please sign in to comment.