fix(Transport): close oneshot transport on error (#340)
This commit is contained in:
parent
98bf02df89
commit
855f57e0e7
1 changed files with 2 additions and 1 deletions
|
|
@ -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?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue