fix: preserve negotiated progress responses (#1005)
This commit is contained in:
parent
a5bb51c9d2
commit
5b053416b8
1 changed files with 156 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue