fix(Transport): close oneshot transport on error (#340)

This commit is contained in:
Pedro DiazVargas 2025-07-29 23:03:21 -04:00 committed by GitHub
parent 98bf02df89
commit 855f57e0e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,7 +221,8 @@ where
item: TxJsonRpcMessage<R>,
) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static {
let sender = self.sender.clone();
let terminate = matches!(item, TxJsonRpcMessage::<R>::Response(_));
let terminate = matches!(item, TxJsonRpcMessage::<R>::Response(_))
|| matches!(item, TxJsonRpcMessage::<R>::Error(_));
let signal = self.finished_signal.clone();
async move {
sender.send(item).await?;