Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change phy::RawSocket to open the underlying socket with O_NONBLOCK #817

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

ritikmishra
Copy link
Contributor

phy::RawSocket is written in a way assuming that the underlying socket is nonblocking (e.g receive checks for io::ErrorKind::WouldBlock here). However, the socket was not being opened in a nonblocking mode.

I found this by trying to use phy::RawSocket to test some larger chunk of smoltcp-using code on macOS -- the first call to iface.poll(...) blocked indefinitely.

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #817 (ab214a6) into main (f9b064a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #817   +/-   ##
=======================================
  Coverage   79.65%   79.65%           
=======================================
  Files          72       72           
  Lines       27862    27862           
=======================================
  Hits        22193    22193           
  Misses       5669     5669           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Dirbaio Dirbaio added this pull request to the merge queue Jul 19, 2023
Merged via the queue into smoltcp-rs:main with commit fa7fd3c Jul 19, 2023
@ritikmishra ritikmishra deleted the raw-socket-nonblock branch July 19, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants