git.graph-it.com
/
graphit
/
controlpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f651262
)
Only send message if bus client callback still there.
author
Benjamin Braatz
<benjamin.braatz@graph-it.com>
Wed, 8 Sep 2021 12:44:44 +0000
(14:44 +0200)
committer
Benjamin Braatz
<benjamin.braatz@graph-it.com>
Wed, 8 Sep 2021 12:44:44 +0000
(14:44 +0200)
controlpi/messagebus.py
patch
|
blob
|
history
diff --git
a/controlpi/messagebus.py
b/controlpi/messagebus.py
index 4ff345313109d4709d9adb9b60c00714ad524551..b320245182874f00788cdea8f3a51d3898331863 100644
(file)
--- a/
controlpi/messagebus.py
+++ b/
controlpi/messagebus.py
@@
-1177,7
+1177,8
@@
class MessageBus:
with open(sys.argv[1], 'w') as conf_file:
json.dump(message['conf'], conf_file)
for client in self._recv_reg.get(message):
- await self._callbacks[client](message)
+ if client in self._callbacks:
+ await self._callbacks[client](message)
self._queue.task_done()
async def send(self, message: Message) -> None: