From a151fe13ea43c2aeb6c6e690c9ba122458985b3c Mon Sep 17 00:00:00 2001 From: DefectingCat Date: Tue, 8 Aug 2023 11:25:49 +0800 Subject: [PATCH] add 500 millis for wait tcp connection end --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5756693..151c4ea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +use std::{thread, time::Duration}; + use anyhow::Result; use clap::Parser; use pluto::{error::PlutoError, HttpMethod, PingMethod, Pluto}; @@ -81,7 +83,7 @@ async fn ping(arg_count: usize, timeout: bool, pluto: &mut Pluto) { count += 1; match pluto.ping().await { Ok(_) => { - // thread::sleep(Duration::from_millis(500)); + thread::sleep(Duration::from_millis(500)); } Err(err) => { eprintln!("Ping {}", err)