When a connection is reused due to pooling it will still do a DNS lookup via the is_ipv6 function while calling connect_options inside the checkout. I don't know if this is intentional or not.
A fix would probably involve having the output of connect_options both include inet in the ipv4 case and modify the cached client here, I can try my hand at it if that's confirmed.
Until this is fixed/if this is not a bug, a workaround is adding to the options a field connect_options: [:inet].
When a connection is reused due to pooling it will still do a DNS lookup via the
is_ipv6
function while callingconnect_options
inside the checkout. I don't know if this is intentional or not.A fix would probably involve having the output of
connect_options
both includeinet
in the ipv4 case and modify the cached client here, I can try my hand at it if that's confirmed.Until this is fixed/if this is not a bug, a workaround is adding to the options a field
connect_options: [:inet]
.