From 0b47ac75f04afae0aa520152676fe3fb3cc3f966 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 20 Jul 2020 19:09:56 +0800 Subject: [PATCH] comms,mgmt: log connections as soon as they arrive --- src/runtime/src/comms.rs | 2 +- src/runtime/src/mgmt.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 26edddd5..882998a2 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -266,7 +266,6 @@ async fn handle_connection(stream: &TcpStream, control: Rc LogBufferRef<'static> { async fn handle_connection(stream: &mut TcpStream, pull_id: Rc>) -> Result<(), Error> { Request::read_magic(stream).await?; - info!("received connection"); loop { let req = Request::read_from(stream).await; @@ -104,6 +103,7 @@ pub fn start() { let mut stream = TcpStream::accept(1380, 2048, 2048).await.unwrap(); let pull_id = pull_id.clone(); task::spawn(async move { + info!("received connection"); let _ = handle_connection(&mut stream, pull_id) .await .map_err(|e| warn!("connection terminated: {:?}", e));