aboutsummaryrefslogtreecommitdiff
path: root/examples/fullmesh.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-07 13:35:24 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-07 13:35:24 +0100
commit5a9ae8615ee616b11460a046deaa6981b10d69ab (patch)
treef625d976531902fa267c20e7359bda43c452d9c4 /examples/fullmesh.rs
parent83789a3076e986782af60ba32b0398414c1c82d7 (diff)
downloadnetapp-5a9ae8615ee616b11460a046deaa6981b10d69ab.tar.gz
netapp-5a9ae8615ee616b11460a046deaa6981b10d69ab.zip
Do not close connections immediately on close signal, await for remaining responses
Diffstat (limited to 'examples/fullmesh.rs')
-rw-r--r--examples/fullmesh.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/fullmesh.rs b/examples/fullmesh.rs
index dfacb89..5addcea 100644
--- a/examples/fullmesh.rs
+++ b/examples/fullmesh.rs
@@ -1,5 +1,5 @@
-use std::net::SocketAddr;
use std::io::Write;
+use std::net::SocketAddr;
use log::info;
@@ -32,13 +32,14 @@ async fn main() {
env_logger::Builder::new()
.parse_env("RUST_LOG")
.format(|buf, record| {
- writeln!(buf,
- "{} {} {} {}",
- chrono::Local::now().format("%s%.6f"),
- record.module_path().unwrap_or("_"),
- record.level(),
- record.args()
- )
+ writeln!(
+ buf,
+ "{} {} {} {}",
+ chrono::Local::now().format("%s%.6f"),
+ record.module_path().unwrap_or("_"),
+ record.level(),
+ record.args()
+ )
})
.init();