Skip to content

Allow calling methods with no expected reply#55

Merged
acrisci merged 1 commit into
altdesktop:masterfrom
SilvairGit:no_reply_expected
Jul 13, 2020
Merged

Allow calling methods with no expected reply#55
acrisci merged 1 commit into
altdesktop:masterfrom
SilvairGit:no_reply_expected

Conversation

@michallowasrzechonek-silvair
Copy link
Copy Markdown
Contributor

@michallowasrzechonek-silvair michallowasrzechonek-silvair commented Jul 10, 2020

Some services expose interfaces that don't send method call replies. This PR allows python-dbus-next to mark method call with NO_REPLY_EXPECTED flag.

Without this, calling such methods results in a warning in logs:

2020-07-10 10:28:57 root                                     ERROR     message_bus.py:573  got unexpected error processing a message: invalid state.
Traceback (most recent call last):
  File "/home/khorne/Programming/silvair/python-dbus-next/dbus_next/message_bus.py", line 570, in _on_message
    self._process_message(msg)
  File "/home/khorne/Programming/silvair/python-dbus-next/dbus_next/message_bus.py", line 668, in _process_message
    handler(msg, None)
  File "/home/khorne/Programming/silvair/python-dbus-next/dbus_next/message_bus.py", line 535, in reply_notify
    callback(reply, err)
  File "/home/khorne/Programming/silvair/python-dbus-next/dbus_next/aio/message_bus.py", line 217, in reply_handler
    future.set_result(reply)
asyncio.base_futures.InvalidStateError: invalid state

@acrisci
Copy link
Copy Markdown
Member

acrisci commented Jul 13, 2020

👍

@acrisci acrisci merged commit 07cf9f5 into altdesktop:master Jul 13, 2020
@michallowasrzechonek-silvair michallowasrzechonek-silvair deleted the no_reply_expected branch July 14, 2020 08:41
michallowasrzechonek-silvair added a commit to SilvairGit/python-bluetooth-mesh that referenced this pull request Aug 4, 2020
michallowasrzechonek-silvair added a commit to SilvairGit/python-bluetooth-mesh that referenced this pull request Aug 4, 2020
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