Skip to content

Commit

Permalink
kernel: fix v1 get_state: if no state, properly return None
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Jan 6, 2025
1 parent f9312ec commit a3bc5be
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kinode/src/kernel/standard_host_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,13 @@ impl StandardHost for process::ProcessWasiV1 {
{
Ok(Ok(_resp)) => {
// basically assuming filesystem responding properly here
match &self.process.last_blob {
None => Ok(None),
Some(blob) => Ok(Some(blob.bytes.clone())),
if self.process.last_message_blobbed {
match &self.process.last_blob {
None => Ok(None),
Some(blob) => Ok(Some(blob.bytes.clone())),
}
} else {
Ok(None)
}
}
_ => Ok(None),
Expand Down

0 comments on commit a3bc5be

Please sign in to comment.