Skip to content

Commit 6aa581f

Browse files
committed
bugfix mqtt broker missing broker thing
1 parent 8534dbc commit 6aa581f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hololinked/server/mqtt.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ async def start(self):
9393

9494
async def setup(self) -> None:
9595
eventloop = get_current_async_loop()
96+
for thing in self.things or []:
97+
if not thing.rpc_server:
98+
raise ValueError(f"Thing {thing.id} is not associated with any RPC server")
99+
self.add_thing_instance_through_broker(
100+
server_id=thing.rpc_server.id,
101+
access_point="INPROC",
102+
thing_id=thing.id,
103+
)
96104
for thing in self._broker_things:
97105
thing, td = await consume_broker_queue(
98106
id=f"{self.hostname}:{self.port}|mqtt-publisher|{uuid.uuid4().hex[:8]}",

0 commit comments

Comments
 (0)