Skip to content

Commit

Permalink
fud v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mariari committed Nov 1, 2023
1 parent 4a526c9 commit 923d7fb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,20 @@ where

let server = self.clone();
let listener_clone = listener.clone();
let s = server.clone();
let conn = Connection {
consensus: s.consensus.clone(),
mempool: s.mempool.clone(),
info: s.info.clone(),
snapshot: s.snapshot.clone(),
};
tokio::spawn(async move {
let s = server.clone();

Check warning on line 179 in src/server.rs

View workflow job for this annotation

GitHub Actions / Check

unused variable: `s`
backoff::future::retry::<_, BoxError, _, _, _>(
ExponentialBackoff::default(),
|| async {

Check failure on line 182 in src/server.rs

View workflow job for this annotation

GitHub Actions / Check

cannot move out of `conn`, a captured variable in an `FnMut` closure
match listener_clone.accept().await {
Ok((socket, _addr)) => {
let conn = Connection {
consensus: s.consensus.clone(),
mempool: s.mempool.clone(),
info: s.info.clone(),
snapshot: s.snapshot.clone(),
};

if let Err(e) = conn.run(socket).await {
match e.downcast::<tower::load_shed::error::Overloaded>() {
Expand Down

0 comments on commit 923d7fb

Please sign in to comment.