Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@w4bremer
Copy link
Contributor

@w4bremer w4bremer commented Jul 27, 2023

πŸ“‘ Description

The python protocol implementation always send a return message on invoke regardless of whether the value actually was empty.
Following the other implementations we only send invoke_reply for non-empty values.

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

@w4bremer w4bremer merged commit b45f72d into main Jul 27, 2023
@w4bremer w4bremer deleted the bugfix/OnlySentReplyForNonEmptyValues branch July 27, 2023 21:48
value = source.olink_invoke(name, args)
self.emit_write(Protocol.invoke_reply_message(id, name, value))
# only send reply for not empty values
if value:
Copy link
Contributor

Choose a reason for hiding this comment

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

value could be int 0. I guess we would like to return an int 0 value or empty string. I guess you need to know if the value == None. Seems to be more safe

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