checkCtxErr is used to determine whether ErrTimeout should be returned in case of context timeout
(err error)
| 3498 | |
| 3499 | // checkCtxErr is used to determine whether ErrTimeout should be returned in case of context timeout |
| 3500 | func (o *pullOpts) checkCtxErr(err error) error { |
| 3501 | if o.ctx == nil && errors.Is(err, context.DeadlineExceeded) { |
| 3502 | return ErrTimeout |
| 3503 | } |
| 3504 | return err |
| 3505 | } |
| 3506 | |
| 3507 | func (js *js) getConsumerInfo(stream, consumer string) (*ConsumerInfo, error) { |
| 3508 | ctx, cancel := context.WithTimeout(context.Background(), js.opts.wait) |
no test coverage detected