bugfix
This commit is contained in:
parent
7eacc6e625
commit
8e84ccecce
@ -128,9 +128,13 @@ class WsPool:
|
|||||||
async def sendto(self, data, id=None):
|
async def sendto(self, data, id=None):
|
||||||
if id is None:
|
if id is None:
|
||||||
return await ws_send(self.ws, data)
|
return await ws_send(self.ws, data)
|
||||||
d = self.get_data()
|
try:
|
||||||
ws = d.get(id)
|
d = self.get_data()
|
||||||
return await ws_send(ws, data)
|
ws = d.get(id)
|
||||||
|
return await ws_send(ws, data)
|
||||||
|
except Exception as e:
|
||||||
|
print('ws.sendto() error:', e)
|
||||||
|
return False
|
||||||
|
|
||||||
class WebsocketProcessor(PythonScriptProcessor):
|
class WebsocketProcessor(PythonScriptProcessor):
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user