Skip to content

Commit

Permalink
Check for DirectAllowed instead of DeleteAllowed (#503)
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth authored and ripienaar committed Mar 11, 2024
1 parent 5425bfe commit 1fc2f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func FirstSequence(seq uint64) StreamOption {
// PageContents creates a StreamPager used to traverse the contents of the stream,
// Close() should be called to dispose of the background consumer and resources
func (s *Stream) PageContents(opts ...PagerOption) (*StreamPager, error) {
if s.Retention() == api.WorkQueuePolicy && !s.DeleteAllowed() {
if s.Retention() == api.WorkQueuePolicy && !s.DirectAllowed() {
return nil, fmt.Errorf("work queue retention streams can only be paged if direct access is allowed")
}

Expand Down

0 comments on commit 1fc2f2b

Please sign in to comment.