Skip to content

Commit

Permalink
device-logs: Fix streaming suppressed logs warnings out of order
Browse files Browse the repository at this point in the history
  • Loading branch information
thgreasi committed Apr 12, 2023
1 parent 37c4933 commit 7676653
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/features/device-logs/lib/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ async function handleStreamingRead(
if (state === StreamState.Closed) {
return;
}
state = StreamState.Writable;
// Do not change to Writable, unless we are in a Saturated state.
// Eg: We shouldn't change state if we are still Buffering, waiting for
// getHistory to finish.
if (state === StreamState.Saturated) {
state = StreamState.Writable;
}
if (dropped) {
const now = Date.now();
onLog({
Expand Down

0 comments on commit 7676653

Please sign in to comment.