reconnect when lost connection during query