MCPcopy
hub / github.com/nats-io/nats.go / wsEnqueueCloseMsg

Method wsEnqueueCloseMsg

ws.go:715–725  ·  view source on GitHub ↗
(needsLock bool, status int, payload string)

Source from the content-addressed store, hash-verified

713}
714
715func (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
727func (nc *Conn) wsEnqueueCloseMsgLocked(status int, payload string) {
728 wr, ok := nc.bw.w.(*websocketWriter)

Callers 1

handleControlFrameMethod · 0.80

Calls 1

Tested by

no test coverage detected