Skip to content

Commit 97c39ff

Browse files
authored
Merge pull request ClickHouse#90735 from ClickHouse/backport/25.8/89740
Backport ClickHouse#89740 to 25.8: Avoid crash due to reading from remote server after disconnect in remote queries during cancellation
2 parents db91610 + fbb1b43 commit 97c39ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Client/Connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ void Connection::sendCancel()
10001000
{
10011001
/// If we already disconnected.
10021002
if (!out)
1003-
return;
1003+
throw Exception(ErrorCodes::NETWORK_ERROR, "Connection to {} terminated", getDescription());
10041004

10051005
writeVarUInt(Protocol::Client::Cancel, *out);
10061006
out->finishChunk();

0 commit comments

Comments
 (0)