aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-net/src/tcp.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs
index c903fb245..1a876692f 100644
--- a/embassy-net/src/tcp.rs
+++ b/embassy-net/src/tcp.rs
@@ -384,13 +384,20 @@ mod embedded_io_impls {
384 384
385 impl embedded_io_async::Error for ConnectError { 385 impl embedded_io_async::Error for ConnectError {
386 fn kind(&self) -> embedded_io_async::ErrorKind { 386 fn kind(&self) -> embedded_io_async::ErrorKind {
387 embedded_io_async::ErrorKind::Other 387 match self {
388 ConnectError::ConnectionReset => embedded_io_async::ErrorKind::ConnectionReset,
389 ConnectError::TimedOut => embedded_io_async::ErrorKind::TimedOut,
390 ConnectError::NoRoute => embedded_io_async::ErrorKind::NotConnected,
391 ConnectError::InvalidState => embedded_io_async::ErrorKind::Other,
392 }
388 } 393 }
389 } 394 }
390 395
391 impl embedded_io_async::Error for Error { 396 impl embedded_io_async::Error for Error {
392 fn kind(&self) -> embedded_io_async::ErrorKind { 397 fn kind(&self) -> embedded_io_async::ErrorKind {
393 embedded_io_async::ErrorKind::Other 398 match self {
399 Error::ConnectionReset => embedded_io_async::ErrorKind::ConnectionReset,
400 }
394 } 401 }
395 } 402 }
396 403