Skip to content

Commit a46a32a

Browse files
committed
USB: zero-length read logged at Debug level (was Error, see #83)
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.
1 parent 4b39c44 commit a46a32a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usbtransport.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ func (conn *usbConn) Read(b []byte) (int, error) {
818818
if n != 0 || err != nil {
819819
return n, err
820820
}
821-
conn.transport.log.Error('!',
821+
conn.transport.log.Debug('!',
822822
"USB[%d]: zero-size read", conn.index)
823823

824824
time.Sleep(backoff)

0 commit comments

Comments
 (0)