diff --git a/src/runtime2/component/component_context.rs b/src/runtime2/component/component_context.rs index 1a8ae2ec64d3393c240a88d43ed921d95a9ad204..c0ec092a208d6353fa9f266ed939cc749fb9288a 100644 --- a/src/runtime2/component/component_context.rs +++ b/src/runtime2/component/component_context.rs @@ -19,7 +19,8 @@ pub struct Port { pub peer_port_id: PortId, // eventually consistent pub kind: PortKind, pub state: PortState, - pub last_instruction: PortInstruction, + pub last_instruction: PortInstruction, // used during sync round in case port ends up being closed for error reporting + pub close_at_sync_end: bool, // used during sync round when receiving a `ClosePort(not_in_sync_round)` message #[cfg(debug_assertions)] pub(crate) associated_with_peer: bool, } @@ -70,6 +71,7 @@ impl CompCtx { state: PortState::Open, peer_comp_id: self.id, last_instruction: PortInstruction::None, + close_at_sync_end: false, #[cfg(debug_assertions)] associated_with_peer: false, }); self.ports.push(Port{ @@ -79,6 +81,7 @@ impl CompCtx { state: PortState::Open, peer_comp_id: self.id, last_instruction: PortInstruction::None, + close_at_sync_end: false, #[cfg(debug_assertions)] associated_with_peer: false, }); @@ -91,6 +94,7 @@ impl CompCtx { self.ports.push(Port{ self_id, peer_comp_id, peer_port_id, kind, state, last_instruction: PortInstruction::None, + close_at_sync_end: false, #[cfg(debug_assertions)] associated_with_peer: false, }); return LocalPortHandle(self_id);