CloseRx closes RxChan if not already closed. Idempotent.
()
| 202 | |
| 203 | // CloseRx closes RxChan if not already closed. Idempotent. |
| 204 | func (s *Session) CloseRx() { |
| 205 | s.mu.Lock() |
| 206 | defer s.mu.Unlock() |
| 207 | if !s.rxClosed { |
| 208 | s.rxClosed = true |
| 209 | close(s.RxChan) |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | // HasPendingTx reports whether DrainTx would emit at least one frame. |
| 214 | func (s *Session) HasPendingTx() bool { |
no outgoing calls
no test coverage detected