()
| 397 | } |
| 398 | |
| 399 | func (s *Session) purgeChannels() { |
| 400 | for len(s.send) > 0 { |
| 401 | <-s.send |
| 402 | } |
| 403 | for len(s.stop) > 0 { |
| 404 | <-s.stop |
| 405 | } |
| 406 | for len(s.detach) > 0 { |
| 407 | <-s.detach |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | // cleanUp is called when the session is terminated to perform resource cleanup. |
| 412 | func (s *Session) cleanUp(expired bool) { |