From 87aca974b10c810c69d12ddb90669a2b7ec60c0b Mon Sep 17 00:00:00 2001 From: davidskula Date: Tue, 7 May 2024 16:07:00 +0200 Subject: [PATCH] impl ReadReady for tcp call can_recv() insted of may_recv() --- embassy-net/src/tcp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index 57c9b7a04..9dfbba32b 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs @@ -555,7 +555,7 @@ mod embedded_io_impls { impl<'d> embedded_io_async::ReadReady for TcpSocket<'d> { fn read_ready(&mut self) -> Result { - Ok(self.io.with(|s, _| s.may_recv())) + Ok(self.io.with(|s, _| s.can_recv())) } } @@ -587,7 +587,7 @@ mod embedded_io_impls { impl<'d> embedded_io_async::ReadReady for TcpReader<'d> { fn read_ready(&mut self) -> Result { - Ok(self.io.with(|s, _| s.may_recv())) + Ok(self.io.with(|s, _| s.can_recv())) } }