(msg)
| 30 | |
| 31 | def make_sync_callback(loop, async_callback, logger=None): |
| 32 | def sync_callback(msg): |
| 33 | try: |
| 34 | loop.call_soon_threadsafe(asyncio.create_task, async_callback(msg)) |
| 35 | except Exception as e: |
| 36 | if logger: |
| 37 | logger.error(f"Failed to schedule callback on event loop: {e}") |
| 38 | return sync_callback |
| 39 | |
| 40 | class WebsocketWatchdog: |
nothing calls this directly
no outgoing calls
no test coverage detected