Skip to content

Commit fbb1b43

Browse files
Backport ClickHouse#89740 to 25.8: Avoid crash due to reading from remote server after disconnect in remote queries during cancellation
1 parent 0ecc1b1 commit fbb1b43

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)