Stop signals the rxLoop goroutine to exit. Must be called after removing the session from the routing table so no new ProcessRx calls can arrive.
()
| 97 | // Stop signals the rxLoop goroutine to exit. Must be called after removing the |
| 98 | // session from the routing table so no new ProcessRx calls can arrive. |
| 99 | func (s *Session) Stop() { |
| 100 | s.stopOnce.Do(func() { close(s.rxDone) }) |
| 101 | } |
| 102 | |
| 103 | // rxLoop is a per-session goroutine that delivers frames from rxInbox to RxChan |
| 104 | // in sequence order. Running it independently from poll workers means a slow |
no outgoing calls