Skip to content

Commit

Permalink
fix(wasi): report closed when MemoryOutputStream is closed
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 8, 2023
1 parent 392fa46 commit 7fc2e95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/wasi/src/preview2/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ impl HostOutputStream for MemoryOutputPipe {
if consumed < self.capacity {
Ok(self.capacity - consumed)
} else {
Ok(0)
// Since the buffer is full, no more bytes will ever be written
Err(OutputStreamError::Closed)
}
}
}
Expand Down

0 comments on commit 7fc2e95

Please sign in to comment.