Cancel session context during close

This commit is contained in:
Ollie Agent 2026-08-17 17:59:19 +02:00
parent 16bf2115fa
commit e1136fdb82
1 changed files with 3 additions and 0 deletions

View File

@ -302,6 +302,9 @@ func (s *Session) RemoveAgent(id string) bool {
// Close releases resources for this session.
func (s *Session) Close() {
s.log.Debug("Close() session=%q", s.ID)
if s.Cancel != nil {
s.Cancel()
}
s.flushSave()
for _, ag := range s.agents {
ag.Close()