Skip to content

Commit

Permalink
Fix WebsocketProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 17, 2022
1 parent aa52eb2 commit 3b57fbc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ypy_websocket/websocket_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

import y_py as Y

from .yutils import YMessageType, process_sync_message, put_updates, sync
from .yutils import (
YMessageType,
create_update_message,
process_sync_message,
put_updates,
sync,
)


class WebsocketProvider:
Expand All @@ -31,7 +37,8 @@ async def _run(self):
async def _send(self):
while True:
update = await self._update_queue.get()
message = create_update_message(update)
try:
await self._websocket.send(update)
await self._websocket.send(message)
except Exception:
pass

0 comments on commit 3b57fbc

Please sign in to comment.