Skip to content

Commit 6b88d5b

Browse files
jonathanpallanteldruin
authored andcommitted
Don't loop forever if card gives bad response.
Stops it hanging if the card is missing.
1 parent 4d10647 commit 6b88d5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sdcard/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ where
420420
Ok(_r) => {
421421
// Try again
422422
warn!("Got response: {:x}, trying again..", _r);
423+
attempts -= 1;
423424
}
424425
}
425426

0 commit comments

Comments
 (0)