cleanUp is called when the session is terminated to perform resource cleanup.
(expired bool)
| 410 | |
| 411 | // cleanUp is called when the session is terminated to perform resource cleanup. |
| 412 | func (s *Session) cleanUp(expired bool) { |
| 413 | atomic.StoreInt32(&s.terminating, 1) |
| 414 | s.purgeChannels() |
| 415 | s.inflightReqs.Wait() |
| 416 | s.inflightReqs = nil |
| 417 | if !expired { |
| 418 | s.sessionStoreLock.Lock() |
| 419 | globals.sessionStore.Delete(s) |
| 420 | s.sessionStoreLock.Unlock() |
| 421 | } |
| 422 | |
| 423 | s.background = false |
| 424 | s.bkgTimer.Stop() |
| 425 | s.unsubAll() |
| 426 | // Stop the write loop. |
| 427 | s.stopSession(nil) |
| 428 | } |
| 429 | |
| 430 | // Message received, convert bytes to ClientComMessage and dispatch |
| 431 | func (s *Session) dispatchRaw(raw []byte) { |
no test coverage detected