From d8f3a3ebc71edc44db583cfb8f89ff8dfc497110 Mon Sep 17 00:00:00 2001 From: Folkert Date: Mon, 27 Nov 2023 14:10:40 +0100 Subject: [PATCH] clean up code - use port 0 instead of a static atomic int (makes this work with cargo nextest) - add some helpers for client/server config creation --- ntpd/src/daemon/keyexchange.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ntpd/src/daemon/keyexchange.rs b/ntpd/src/daemon/keyexchange.rs index 6decc1c1e..edeccfeea 100644 --- a/ntpd/src/daemon/keyexchange.rs +++ b/ntpd/src/daemon/keyexchange.rs @@ -951,13 +951,8 @@ mod tests { let port = listener.local_addr().unwrap().port(); tokio::spawn(async move { - // give the server some time to make the port available - tokio::time::sleep(std::time::Duration::from_millis(20)).await; - // create the stream, then shut it down without sending anything let stream = client_tls_stream("localhost", port).await; - - // "dirty" shutdown stream.into_inner().0.shutdown().await.unwrap(); });