Skip to content

Commit 40a5a0f

Browse files
committed
fix: mcp connection closing
1 parent f5d121c commit 40a5a0f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/agent-api/src/functions/chats-post.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ export async function postChats(request: HttpRequest, context: InvocationContext
166166
// Ensure the session title has finished generating
167167
await sessionTitlePromise;
168168
}
169+
170+
// Close MCP client connection
171+
await client.close();
169172
} catch (error) {
170173
context.error('Error after response completion:', error);
171174
}

0 commit comments

Comments
 (0)