Skip to content

Commit e475ae6

Browse files
committed
Do not send a zero-sized packet twice
1 parent 519b9c8 commit e475ae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_class_host/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn bulk_loopback(dev, _out) {
143143
data.len(),
144144
"bulk write len {}", len);
145145

146-
if *len % 64 == 0 {
146+
if *len > 0 && *len % 64 == 0 {
147147
assert_eq!(
148148
dev.write_bulk(0x01, &[], TIMEOUT)
149149
.expect(&format!("bulk write zero-length packet")),

0 commit comments

Comments
 (0)