From e5bc2a0f1824d7cbc7542db27718897ff0abf00f Mon Sep 17 00:00:00 2001 From: "nobu.maeda" Date: Mon, 1 Apr 2024 16:47:03 +0800 Subject: [PATCH] Missed shutdown removal from Takers --- src/taker/taker.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/taker/taker.rs b/src/taker/taker.rs index c342f87..ac39cb7 100644 --- a/src/taker/taker.rs +++ b/src/taker/taker.rs @@ -254,7 +254,7 @@ impl TakerActor { self.send_peer_message(message, rsp_tx).await; } TakerRequest::TradeComplete { rsp_tx } => { - terminate = self.trade_complete(rsp_tx); + self.trade_complete(rsp_tx); } TakerRequest::RegisterNotifTx { tx, rsp_tx } => { self.register_notif_tx(tx, rsp_tx); @@ -383,16 +383,15 @@ impl TakerActor { } } - fn trade_complete(&mut self, rsp_tx: oneshot::Sender>) -> bool { + fn trade_complete(&mut self, rsp_tx: oneshot::Sender>) { if let Some(error) = self.check_trade_completed().err() { rsp_tx.send(Err(error)).unwrap(); // oneshot should not fail - return false; + return; } // TODO: What else to do for Trade Complete? self.data.set_trade_completed(true); rsp_tx.send(Ok(())).unwrap(); - return true; } fn shutdown(&mut self, rsp_tx: oneshot::Sender>) {