diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-07 13:35:24 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-07 13:35:24 +0100 |
commit | 5a9ae8615ee616b11460a046deaa6981b10d69ab (patch) | |
tree | f625d976531902fa267c20e7359bda43c452d9c4 /src/peering/fullmesh.rs | |
parent | 83789a3076e986782af60ba32b0398414c1c82d7 (diff) | |
download | netapp-5a9ae8615ee616b11460a046deaa6981b10d69ab.tar.gz netapp-5a9ae8615ee616b11460a046deaa6981b10d69ab.zip |
Do not close connections immediately on close signal, await for remaining responses
Diffstat (limited to 'src/peering/fullmesh.rs')
-rw-r--r-- | src/peering/fullmesh.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/peering/fullmesh.rs b/src/peering/fullmesh.rs index 1b26489..d6ca08a 100644 --- a/src/peering/fullmesh.rs +++ b/src/peering/fullmesh.rs @@ -185,12 +185,10 @@ impl FullMeshPeeringStrategy { ); let strat2 = strat.clone(); - netapp.on_disconnected( - move |pk: ed25519::PublicKey, is_incoming: bool| { - let strat2 = strat2.clone(); - tokio::spawn(strat2.on_disconnected(pk, is_incoming)); - }, - ); + netapp.on_disconnected(move |pk: ed25519::PublicKey, is_incoming: bool| { + let strat2 = strat2.clone(); + tokio::spawn(strat2.on_disconnected(pk, is_incoming)); + }); strat } |