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

Method getNextMsgErr

nats.go:5526–5533  ·  view source on GitHub ↗

This is called when the sync channel has been closed. The error returned will be either connection or subscription closed depending on what caused NextMsg() to fail.

()

Source from the content-addressed store, hash-verified

5524// The error returned will be either connection or subscription
5525// closed depending on what caused NextMsg() to fail.
5526func (s *Subscription) getNextMsgErr() error {
5527 s.mu.Lock()
5528 defer s.mu.Unlock()
5529 if s.connClosed {
5530 return ErrConnectionClosed
5531 }
5532 return ErrBadSubscription
5533}
5534
5535// processNextMsgDelivered takes a message and applies the needed
5536// accounting to the stats from the subscription, returning an

Callers 3

NextMsgMethod · 0.95
nextMsgNoTimeoutMethod · 0.95
nextMsgWithContextMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected