mdlayher / raw

Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.
MIT License
425 stars 71 forks source link

raw: time out on Linux when deadline has passed #15

Closed mdlayher closed 6 years ago

mdlayher commented 6 years ago

/cc @corny

Without this, I'm seeing EDOM on Linux.

[zsh|matt@nerr-2]:~/src/github.com/mdlayher/arp/cmd/arpc 0 *(master) ± time sudo ./arpc -d 1s -ip 192.168.1.3                 
2017/11/07 11:56:29 numerical argument out of domain
sudo ./arpc -d 1s -ip 192.168.1.3  0.00s user 0.01s system 1% cpu 1.050 total

With my patch:

[zsh|matt@nerr-2]:~/src/github.com/mdlayher/arp/cmd/arpc 0 *(master) ± time sudo ./arpc -d 1s -ip 192.168.1.3
2017/11/07 11:57:00 i/o timeout
sudo ./arpc -d 1s -ip 192.168.1.3  0.00s user 0.02s system 1% cpu 1.046 total
corny commented 6 years ago

looks good! :+1: