Skip to content

Commit b611c18

Browse files
authored
Merge pull request #683 from swimos/agent_on_start
Fixes agent downlinks not being opened after on_start call
2 parents 208c4d9 + cdc480a commit b611c18

File tree

1 file changed

+9
-0
lines changed
  • server/swimos_agent/src/agent_model

1 file changed

+9
-0
lines changed

server/swimos_agent/src/agent_model/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,15 @@ where
10061006
lane_readers.push(LaneReader::http(id, rx));
10071007
}
10081008

1009+
// We need to check if anything has been written into the command buffer as the agent
1010+
// initialisation process called lifecycle::on_start and that may have sent commands.
1011+
check_cmds(
1012+
&mut ad_hoc_buffer,
1013+
&mut cmd_writer,
1014+
&mut cmd_send_fut,
1015+
CommandWriter::write,
1016+
);
1017+
10091018
// This set keeps track of which items have data to be written (according to executed event handlers).
10101019
let mut dirty_items: HashSet<u64> = HashSet::new();
10111020

0 commit comments

Comments
 (0)