Skip to content

Commit ae035ef

Browse files
Backport #89740 to 25.9: Avoid crash due to reading from remote server after disconnect in remote queries during cancellation
1 parent 97a17fe commit ae035ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Client/Connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ void Connection::sendCancel()
10081008
{
10091009
/// If we already disconnected.
10101010
if (!out)
1011-
return;
1011+
throw Exception(ErrorCodes::NETWORK_ERROR, "Connection to {} terminated", getDescription());
10121012

10131013
writeVarUInt(Protocol::Client::Cancel, *out);
10141014
out->finishChunk();

0 commit comments

Comments
 (0)