Skip to content

Commit 81fc657

Browse files
committed
Restore websocket task termination
1 parent 34a31b8 commit 81fc657

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lmstudio/_ws_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ def connect(self) -> bool:
245245
loop = ws_thread.wait_for_loop() # Block until loop is available
246246
if loop is None:
247247
raise RuntimeError("Websocket handling thread has no event loop")
248-
ws_thread.schedule_background_task(self._run_ws_handler())
248+
ws_thread.schedule_background_task(self._run_until_terminated())
249249
asyncio.run_coroutine_threadsafe(
250250
self._connection_attempted.wait(), loop
251251
).result()
252252
return self._ws is not None
253253

254-
async def _run_ws_handler(self) -> None:
254+
async def _task_target(self) -> None:
255255
self._logger.info("Websocket handling task started")
256256
self._init_event_loop()
257257
try:

0 commit comments

Comments
 (0)