Suscription sends data
This commit is contained in:
parent
b90858b5cb
commit
940fed4bdf
3
model.py
3
model.py
@ -101,10 +101,11 @@ class Model(object):
|
||||
self.model["clients"][clientname] = newclient
|
||||
return clientname
|
||||
|
||||
def subscribe(self, clientid, socket):
|
||||
async def subscribe(self, clientid, socket):
|
||||
if not clientid in self.sockets:
|
||||
self.sockets[clientid] = []
|
||||
self.sockets[clientid].append(socket)
|
||||
await self.send_state(clientid)
|
||||
|
||||
def unsubscribe(self, socket):
|
||||
for client in self.sockets:
|
||||
|
Loading…
Reference in New Issue
Block a user