mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-22 11:22:59 +03:00
Merge pull request #611 from kinode-dao/hf/kernel-hold-onto-blobs-until-receive-non-none
kernel: dont replace `last_blob` with None
This commit is contained in:
commit
10181710e3
@ -99,7 +99,10 @@ impl process::ProcessState {
|
||||
ref expects_response,
|
||||
..
|
||||
}) => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
km.lazy_load_blob = None;
|
||||
if expects_response.is_some() || km.rsvp.is_some() {
|
||||
// update prompting_message iff there is someone to reply to
|
||||
@ -109,13 +112,19 @@ impl process::ProcessState {
|
||||
}
|
||||
t::Message::Response(_) => match self.contexts.remove(&km.id) {
|
||||
Some((context, _timeout_handle)) => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
km.lazy_load_blob = None;
|
||||
self.prompting_message = context.prompting_message;
|
||||
(km, context.context)
|
||||
}
|
||||
None => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
km.lazy_load_blob = None;
|
||||
self.prompting_message = Some(km.clone());
|
||||
(km, None)
|
||||
|
@ -103,8 +103,10 @@ impl process::ProcessState {
|
||||
ref expects_response,
|
||||
..
|
||||
}) => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
if expects_response.is_some() || km.rsvp.is_some() {
|
||||
// update prompting_message iff there is someone to reply to
|
||||
self.prompting_message = Some(km.clone());
|
||||
@ -113,14 +115,18 @@ impl process::ProcessState {
|
||||
}
|
||||
t::Message::Response(_) => match self.contexts.remove(&km.id) {
|
||||
Some((context, _timeout_handle)) => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
self.prompting_message = context.prompting_message;
|
||||
(km, context.context)
|
||||
}
|
||||
None => {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
if km.lazy_load_blob.is_some() {
|
||||
self.last_blob = km.lazy_load_blob;
|
||||
km.lazy_load_blob = None;
|
||||
}
|
||||
self.prompting_message = Some(km.clone());
|
||||
(km, None)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user