Skip to content

Commit

Permalink
USB: zero-length read logged at Debug level (was Error, see #83)
Browse files Browse the repository at this point in the history
Experience shows that some devices tend to send zero-length USB packets
even when they shouldn't, and this is a normal occurrence with these
devices.

The log level for these events has been reduced from Error to Debug in
order to minimize clutter in the log files.
  • Loading branch information
alexpevzner committed Sep 10, 2024
1 parent 4b39c44 commit a46a32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usbtransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ func (conn *usbConn) Read(b []byte) (int, error) {
if n != 0 || err != nil {
return n, err
}
conn.transport.log.Error('!',
conn.transport.log.Debug('!',
"USB[%d]: zero-size read", conn.index)

time.Sleep(backoff)
Expand Down

0 comments on commit a46a32a

Please sign in to comment.