From bb8393604d37e09b5746ab22d777d3b2380c24cd Mon Sep 17 00:00:00 2001 From: askdevai-bot Date: Sat, 31 May 2025 14:46:17 -0400 Subject: [PATCH 1/2] Update .DS_Store --- .DS_Store | Bin 0 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..328dcc74cf4fa6ecf8d98436a4f35feced6448ef GIT binary patch literal 6148 zcmeHKO-sW-5S?wSCKRCu1&<3}i`M#$mssn;s}Vh@)WjAI#%yU*iS#jLY+=g9S(G$Y zzovRgv#Ytj8E{<3ZIqSW}l3?^vt;CGT(B{w)aVvZP$tN<&(3QVU0b~kg1(>Z;fH7mdh{GbA~KS*>! z&thg!Zyng^5&*G)-P$mwA4cLxi=M^IAda93Lq#-HVM`2Q=-4l9o@X&LXy_np@geM! zg{@G8emdS?>U0pEL2g+AR^Y1wRQsWo==?wYzW&!q+^_)E literal 0 HcmV?d00001 From 2b7a806fc157ee6b844ae12a9399a12509234849 Mon Sep 17 00:00:00 2001 From: askdevai-bot Date: Sat, 31 May 2025 14:46:18 -0400 Subject: [PATCH 2/2] Update tinyagent/mcp_client.py --- tinyagent/mcp_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tinyagent/mcp_client.py b/tinyagent/mcp_client.py index eb1919f..e4fab50 100644 --- a/tinyagent/mcp_client.py +++ b/tinyagent/mcp_client.py @@ -109,11 +109,11 @@ async def close(self): if self.exit_stack: try: await self.exit_stack.aclose() - except (RuntimeError, asyncio.CancelledError) as e: - # Log the error but don't re-raise it + except Exception as e: + # Log any cleanup error (including cancel-scope mismatches) but don’t re-raise self.logger.error(f"Error during client cleanup: {e}") finally: - # Always reset these regardless of success or failure + # Reset client state unconditionally self.session = None self.exit_stack = AsyncExitStack()