sql: Fixed retrying query when multiple hosts were specified and all of them got disconnected.
sql: Fixed retrying query when multiple hosts were specified and all of them got disconnected.

damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot