From 938b29d418a9df2f93ee273a394f34adc99ea25d Mon Sep 17 00:00:00 2001 From: hozan23 Date: Sat, 18 Nov 2023 13:36:19 +0300 Subject: net: improve Conn API --- p2p/src/discovery/refresh.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'p2p/src/discovery') diff --git a/p2p/src/discovery/refresh.rs b/p2p/src/discovery/refresh.rs index 1ced266..b9b7bae 100644 --- a/p2p/src/discovery/refresh.rs +++ b/p2p/src/discovery/refresh.rs @@ -270,11 +270,11 @@ impl RefreshService { let ping_msg = PingMsg(nonce); let buffer = encode(&ping_msg)?; - conn.send(&buffer).await?; + conn.write(&buffer).await?; let buf = &mut [0; PINGMSG_SIZE]; let t = Duration::from_secs(self.config.refresh_response_timeout); - timeout(t, conn.recv(buf)).await??; + timeout(t, conn.read(buf)).await??; let (pong_msg, _) = decode::(buf)?; -- cgit v1.2.3