Fix copy-pasto
Check a socket's connectivity before trying to use it

This alleviates some cases where multi-second lag occurs before a query
returns due to some or all connections having been closed by the peer,
e.g. a load balancer timing out old connections, but they are all tried
before opening new connections.

Tested and working on Linux.
Minor comment spelling fix