Skip to content

Commit d510ede

Browse files
author
Alan Christie
committed
feat: Attempt of fix msg transmission
1 parent 4373ac6 commit d510ede

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,10 @@ async def on_message_for_websocket(
376376
# as long as it uses the separator "|str()" and places properties at the end
377377
# of the received string.
378378
decoded_msg = f"{decoded_msg}|{message_context.offset}|{message_context.timestamp}|"
379+
text = decoded_msg.encode("utf-8")
380+
_LOGGER.info("Sending msg for %s (%s)...", es_id, text)
379381
try:
380-
_LOGGER.debug("Sending msg for %s...", es_id)
381-
await websocket.send_text(str(decoded_msg.encode("utf-8")))
382+
await websocket.send_text(text)
382383
except WebSocketDisconnect:
383384
_LOGGER.info("Got WebSocketDisconnect for %s (stopping)...", es_id)
384385
shutdown = True

0 commit comments

Comments
 (0)