Merge pull request #71 from dj-oyu/fix/close-wait-requests
fix: wait for in-flight LLM requests in Close()
This commit is contained in:
commit
65db89214e
1 changed files with 3 additions and 0 deletions
|
|
@ -619,6 +619,9 @@ func (al *AgentLoop) Stop() {
|
|||
// and dirty session data). Should be called during graceful shutdown.
|
||||
|
||||
func (al *AgentLoop) Close() {
|
||||
// Wait for in-flight LLM requests to finish before releasing resources.
|
||||
al.activeRequests.Wait()
|
||||
|
||||
al.closeExt()
|
||||
|
||||
mcpManager := al.mcp.takeManager()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue