mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix possible error "Cannot drain connections: cancel first"
This commit is contained in:
parent
2ecfde96b6
commit
59db219410
@ -591,8 +591,8 @@ void RemoteQueryExecutor::finish()
|
|||||||
/// Send the request to abort the execution of the request, if not already sent.
|
/// Send the request to abort the execution of the request, if not already sent.
|
||||||
tryCancel("Cancelling query because enough data has been read");
|
tryCancel("Cancelling query because enough data has been read");
|
||||||
|
|
||||||
/// If connections weren't created yet or query wasn't sent, nothing to do.
|
/// If connections weren't created yet, query wasn't sent or was already finished, nothing to do.
|
||||||
if (!connections || !sent_query)
|
if (!connections || !sent_query || finished)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/// Get the remaining packets so that there is no out of sync in the connections to the replicas.
|
/// Get the remaining packets so that there is no out of sync in the connections to the replicas.
|
||||||
|
Loading…
Reference in New Issue
Block a user