reinitialize the connection after errors

This commit is contained in:
Alexander Kuzmenkov 2021-04-28 13:26:23 +03:00
parent bb675e7d11
commit 36593d5cc3

View File

@ -1518,6 +1518,11 @@ private:
server_exception.reset(); server_exception.reset();
client_exception.reset(); client_exception.reset();
have_error = false; have_error = false;
// We have to reinitialize connection after errors, because it
// might have gotten into a wrong state and we'll get false
// positives about "Unknown packet from server".
connection->forceConnected(connection_parameters.timeouts);
} }
else if (ast_to_process->formatForErrorMessage().size() > 500) else if (ast_to_process->formatForErrorMessage().size() > 500)
{ {