diff options
author | hozan23 <hozan23@proton.me> | 2023-11-18 13:36:19 +0300 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2023-11-19 04:37:50 +0300 |
commit | 938b29d418a9df2f93ee273a394f34adc99ea25d (patch) | |
tree | f8adfeede7c6f56091ef6a018820fa0b52f38bf3 /p2p/src/discovery | |
parent | 0d6c8ad2ed66ff7bd1078be9ea7b582262a12d86 (diff) |
net: improve Conn API
Diffstat (limited to 'p2p/src/discovery')
-rw-r--r-- | p2p/src/discovery/refresh.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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::<PongMsg>(buf)?; |