diff --git a/src/runtime2/component/component_context.rs b/src/runtime2/component/component_context.rs index 1d00c2c83fa9b0ae269fe690f659ef94cf4c9e1d..8bf9189d82ed212972b3acfc4bf5aeecf3352fbe 100644 --- a/src/runtime2/component/component_context.rs +++ b/src/runtime2/component/component_context.rs @@ -129,6 +129,7 @@ pub struct Port { pub kind: PortKind, pub state: PortState, // State tracking for error detection and error handling + pub last_registered_round: Option, pub last_instruction: PortInstruction, // used during sync round to detect port-closed-during-sync errors pub received_message_for_sync: bool, // used during sync round to detect port-closed-before-sync errors pub close_at_sync_end: bool, // set during sync round when receiving a port-closed-after-sync message @@ -181,6 +182,7 @@ impl CompCtx { kind: PortKind::Putter, state: PortState::new(), peer_comp_id: self.id, + last_registered_round: None, last_instruction: PortInstruction::None, close_at_sync_end: false, received_message_for_sync: false, @@ -192,6 +194,7 @@ impl CompCtx { kind: PortKind::Getter, state: PortState::new(), peer_comp_id: self.id, + last_registered_round: None, last_instruction: PortInstruction::None, close_at_sync_end: false, received_message_for_sync: false, @@ -206,6 +209,7 @@ impl CompCtx { let self_id = PortId(self.take_port_id()); self.ports.push(Port{ self_id, peer_comp_id, peer_port_id, kind, state, + last_registered_round: None, last_instruction: PortInstruction::None, close_at_sync_end: false, received_message_for_sync: false,