google / periph

Older version of periph, see new version at https://github.com/periph
https://periph.io
Apache License 2.0
1.75k stars 167 forks source link

netlink/onewire: fix error handling when reading from the netlink socket #448

Closed mhabb closed 4 years ago

mhabb commented 4 years ago

When responding to a sequence of 1-wire commands, the kernel driver individually acks every single one. It is important to keep reading all of these messages in case of an error in order to flush the netlink socket for future commands.

codecov-commenter commented 4 years ago

Codecov Report

Merging #448 into master will decrease coverage by 0.1%. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #448     +/-   ##
========================================
- Coverage    62.9%   62.8%   -0.1%     
========================================
  Files         125     125             
  Lines       12773   12773             
========================================
- Hits         8038    8027     -11     
- Misses       4508    4517      +9     
- Partials      227     229      +2     
Impacted Files Coverage Δ
...ph.io/x/periph/experimental/devices/hx711/hx711.go 73.1% <0.0%> (-6.5%) :arrow_down:
...rc/periph.io/x/periph/host/sysfs/thermal_sensor.go 81.5% <0.0%> (-2.3%) :arrow_down:
src/periph.io/x/periph/host/sysfs/fs_linux.go 68.1% <0.0%> (-1.7%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bc9757f...8352146. Read the comment docs.

maruel commented 4 years ago

gohci