diff --git a/services/net/src/main.rs b/services/net/src/main.rs index 4ef1b9dae..6e82e5c43 100644 --- a/services/net/src/main.rs +++ b/services/net/src/main.rs @@ -547,7 +547,7 @@ fn xmain() -> ! { sockets.remove(handle); if let Some(response) = msg.body.memory_message_mut() { response.buf.as_slice_mut::()[0] = 0; - } else if !msg.body.is_blocking() && msg.body.is_blocking() { + } else if !msg.body.has_memory() && msg.body.is_blocking() { xous::return_scalar(msg.sender, 0).ok(); } } @@ -1071,7 +1071,7 @@ fn xmain() -> ! { sockets.remove(handle); if let Some(response) = msg.body.memory_message_mut() { response.buf.as_slice_mut::()[0] = 0; - } else if msg.body.is_blocking() { + } else if !msg.body.has_memory() && msg.body.is_blocking() { xous::return_scalar(msg.sender, 0).ok(); } }