You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
// EOF
Err(tcp::RecvError::Finished) => Poll::Ready(Ok(0)),
// Connection reset. TODO: this can also be timeouts etc, investigate.
Err(tcp::RecvError::InvalidState) => Poll::Ready(Err(Error::ConnectionReset)),
Might it be so that, Err(tcp::RecvError::Finished) indicates when other end has closed it's write side, i.e. EOF, which read() indicates, but read_recv() should not distinguish between other end closed its write side and a ConnectionReset)?
I suppose read() does the right thing, even if it feels a bit error prone to indicate a non recoverable EOF with Ok(0) instead of ConnectionReset (I suppose I am not the only who managed forget the Ok(0) case and locked up my task in a tight loop).
In any case, thanks for the impressive work put into embassy-rs!
BR
Mattias
The text was updated successfully, but these errors were encountered:
Hi,
Is there a reason for the difference regarding Err
(tcp::RecvError::Finished)
for tcp.rs read_with(...):and tcp.rs read(...):
Might it be so that,
Err(tcp::RecvError::Finished)
indicates when other end has closed it's write side, i.e. EOF, which read() indicates, but read_recv() should not distinguish between other end closed its write side and a ConnectionReset)?I suppose read() does the right thing, even if it feels a bit error prone to indicate a non recoverable EOF with Ok(0) instead of ConnectionReset (I suppose I am not the only who managed forget the Ok(0) case and locked up my task in a tight loop).
In any case, thanks for the impressive work put into embassy-rs!
BR
Mattias
The text was updated successfully, but these errors were encountered: