Skip to content

Commit

Permalink
fix: timeout may still be hit even if we technically do have some data
Browse files Browse the repository at this point in the history
  • Loading branch information
sverben authored Sep 17, 2024
1 parent 185017b commit 985cc85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libserial/LibSerial.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ EM_ASYNC_JS(void, read_data, (int timeoutMs, int length), {
}
}

if (read === 0) {
if (read < length) {
window["avrdudeLog"] = [...window["avrdudeLog"], "Timeout"];
return;
}
Expand Down

0 comments on commit 985cc85

Please sign in to comment.