Skip to content

Update partners right after creating partnered control function#671

Merged
ad3154 merged 1 commit intoOpen-Agriculture:mainfrom
alfonsorosd:protect_update
Mar 10, 2026
Merged

Update partners right after creating partnered control function#671
ad3154 merged 1 commit intoOpen-Agriculture:mainfrom
alfonsorosd:protect_update

Conversation

@alfonsorosd
Copy link
Copy Markdown
Contributor

Describe your changes

While testing our application, we noticed that the first message to an available external control function was being dropped. Even after being notified about the CF being available.

The reason was that the PartneredControlFunction handle for the control function was created on demand when the message was sent. The network manager thread has to call update_new_partners() to enable the handle to send a message to the external control function.

Calling update_new_partners() immediately after creating the partnered handle fixes this issue for us.

How has this been tested?

Adds a unit test to test the exact scenario

Context:

Prevents dropping the first message to an available external control
function when its handler is created at the moment of sending the
message.
Copy link
Copy Markdown
Member

@ad3154 ad3154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle for the control function was created on demand when the message was sent. Interesting

Interesting... that is not my typical pattern, but I suppose that makes sense. Good enhancement, thank you!

@ad3154 ad3154 merged commit 0a0ed87 into Open-Agriculture:main Mar 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants