From 98996a8f0fb4c882f0d4c1c1bb93eb3e5846bba0 Mon Sep 17 00:00:00 2001 From: driftluo Date: Wed, 22 Feb 2023 17:09:51 +0800 Subject: [PATCH] fix: omission modification --- network/src/network.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/network/src/network.rs b/network/src/network.rs index 6aec09d62a..9acc913b3f 100644 --- a/network/src/network.rs +++ b/network/src/network.rs @@ -717,13 +717,11 @@ impl ServiceHandle for EventHandler { "registry peer failed {:?} disconnect it, {} => {}", err, session_context.id, session_context.address, ); - if let Err(err) = async_disconnect_with_message( - context.control(), + if let Err(err) = disconnect_with_message( + &control, session_context.id, "reject peer connection", - ) - .await - { + ) { debug!( "Disconnect failed {:?}, error: {:?}", session_context.id, err