Cancel session context during close
This commit is contained in:
parent
16bf2115fa
commit
e1136fdb82
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue