fix: preserve negotiated progress responses (#1005)

This commit is contained in:
Dale Seo 2026-07-20 16:20:12 -04:00 • committed by GitHub
commit 5b053416b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -947,7 +947,13 @@ where
))
})?;
if self.config.json_response || jsonrpc_http_status(&first) != http::StatusCode::OK {
let terminal = matches!(
&first,
ServerJsonRpcMessage::Response(_) | ServerJsonRpcMessage::Error(_)
);
if terminal
&& (self.config.json_response || jsonrpc_http_status(&first) != http::StatusCode::OK)
{
// This message is the whole reply, so `receiver` is dropped here and
// anything the handler emits afterwards is undeliverable. Cancel it so
// a still-running handler stops instead of running on unobserved: its