Skip to content

Commit

Permalink
address some PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillLykov committed Feb 12, 2025
1 parent 27a0933 commit 27f263c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions send-transaction-service/src/transaction_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,18 +410,20 @@ where
error!("Failed to stop scheduler: TpuClientNext task panicked.");
return;
};
let (handle, token) = std::mem::take(&mut *lock);
let (cancel, token) = std::mem::take(&mut *lock);
token.cancel();
if let Some(handle) = handle {
match self.runtime_handle.block_on(handle) {
Ok(result) => match result {
Ok(stats) => {
debug!("tpu-client-next statistics over all the connections: {stats:?}");
}
Err(error) => error!("tpu-client-next exits with error {error}."),
},
Err(error) => error!("Failed to join task {error}."),
}
let Some(handle) = cancel else {
error!("Client task handle was not set.");
return;
};
match self.runtime_handle.block_on(handle) {
Ok(result) => match result {
Ok(stats) => {
debug!("tpu-client-next statistics over all the connections: {stats:?}");
}
Err(error) => error!("tpu-client-next exits with error {error}."),
},
Err(error) => error!("Failed to join task {error}."),
}
}
}
Expand Down

0 comments on commit 27f263c

Please sign in to comment.