(needsLock bool, status int, payload string)
| 713 | } |
| 714 | |
| 715 | func (nc *Conn) wsEnqueueCloseMsg(needsLock bool, status int, payload string) { |
| 716 | // In some low-level unit tests it will happen... |
| 717 | if nc == nil { |
| 718 | return |
| 719 | } |
| 720 | if needsLock { |
| 721 | nc.mu.Lock() |
| 722 | defer nc.mu.Unlock() |
| 723 | } |
| 724 | nc.wsEnqueueCloseMsgLocked(status, payload) |
| 725 | } |
| 726 | |
| 727 | func (nc *Conn) wsEnqueueCloseMsgLocked(status int, payload string) { |
| 728 | wr, ok := nc.bw.w.(*websocketWriter) |
no test coverage detected