Closed jvns closed 3 years ago
Hi @jvns, thanks for the PR. I'd like to merge it, but it seems to be failing the pipeline on cargo fmt
. Should be pretty straightforward to rectify.
Something for me to think of as a follow-up would be how to include tests for issues like the one you're fixing in the CI.
Fixed!
Hi! This change worked well for me, and also inspired me to update Tokio from 0.2 to 1.0.
Submitted as #170, which conflicts with this PR (and overwrites the changes here -- they touch the same lines of code).
Awesome! Closing this then.
Fixes #90, where the
streamlisten
example fails on Mac OS.This fix comes from this comment on https://github.com/tokio-rs/tokio/issues/2413. It looks like the issue is that the pcap file descriptor is read-only, but PollEvented by default expects it to be read-write, so it raises an error.
I've tested that with this change, the
streamlisten
example works on Mac, and that without it I get anInvalidInput
error when running that example.