Skip to content

Commit a91dafa

Browse files
committed
fix: handle keep alive errors
1 parent 3b944c3 commit a91dafa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-mcp"
3-
version = "0.0.65"
3+
version = "0.0.66"
44
description = "UiPath MCP SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_mcp/_cli/_runtime/_runtime.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,12 @@ async def _keep_alive(self) -> None:
380380
"""
381381
Heartbeat to keep the runtime available.
382382
"""
383-
while True:
383+
while not self._cancel_event.is_set():
384384
try:
385385
async def on_keep_alive_response(response: CompletionMessage) -> None:
386+
if response.error:
387+
logger.error(f"Error during keep-alive: {response.error}")
388+
return
386389
session_ids = response.result
387390
logger.info(f"Active sessions: {session_ids}")
388391
# If there are no active sessions and this is a sandbox environment

0 commit comments

Comments
 (0)