subscribe is the internal subscribe function that indicates interest in a subject.
(subj, queue string, cb MsgHandler, ch chan *Msg, errCh chan (error), isSync bool, js *jsSub)
| 4882 | |
| 4883 | // subscribe is the internal subscribe function that indicates interest in a subject. |
| 4884 | func (nc *Conn) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, errCh chan (error), isSync bool, js *jsSub) (*Subscription, error) { |
| 4885 | if nc == nil { |
| 4886 | return nil, ErrInvalidConnection |
| 4887 | } |
| 4888 | nc.mu.Lock() |
| 4889 | defer nc.mu.Unlock() |
| 4890 | return nc.subscribeLocked(subj, queue, cb, ch, errCh, isSync, js) |
| 4891 | } |
| 4892 | |
| 4893 | func (nc *Conn) subscribeLocked(subj, queue string, cb MsgHandler, ch chan *Msg, errCh chan (error), isSync bool, js *jsSub) (*Subscription, error) { |
| 4894 | if nc == nil { |
no test coverage detected