comparison libervia/pages/_browser/bridge.py @ 1506:ce879da7fcf7

server: fix `on_signal` callback
author Goffi <goffi@goffi.org>
date Thu, 23 Mar 2023 17:50:54 +0100
parents 409d10211b20
children 106bae41f5c8
comparison
equal deleted inserted replaced
1505:a169cbc315f0 1506:ce879da7fcf7
104 104
105 def on_message(self, message_evt): 105 def on_message(self, message_evt):
106 msg_data = json.loads(message_evt.data) 106 msg_data = json.loads(message_evt.data)
107 msg_type = msg_data.get("type") 107 msg_type = msg_data.get("type")
108 if msg_type == "bridge": 108 if msg_type == "bridge":
109 log.debug(
110 f"==> bridge message: {msg_data=}"
111 )
109 self.broadcast_channel.post( 112 self.broadcast_channel.post(
110 msg_type, 113 msg_type,
111 msg_data["data"] 114 msg_data["data"]
112 ) 115 )
113 elif msg_type == "force_close": 116 elif msg_type == "force_close":