fix: Fetch() masks JetStream errors as empty-queue when zero msgs arrive (archie)
Fixes #35
This commit is contained in:
1 parent
03899171e6
commit
5045592d41
1 file changed
+3
-3
@@ -159,11 +159,11 @@ func (c *Client) Fetch(ctx context.Context) (jetstream.Msg, error) {
|
||||
if msg == nil {
|
||||
continue
|
||||
}
|
||||
if err := batch.Error(); err != nil {
|
||||
return nil, fmt.Errorf("nats fetch batch: %w", err)
|
||||
}
|
||||
return msg, nil
|
||||
}
|
||||
if err := batch.Error(); err != nil {
|
||||
return nil, fmt.Errorf("nats fetch batch: %w", err)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user