Skip to content

Commit

Permalink
subscription.EndOfStoredEvents to have a capacity of 1 so it never ge…
Browse files Browse the repository at this point in the history
…ts deadlocked.
  • Loading branch information
fiatjaf committed Jan 28, 2024
1 parent 58ff5f6 commit 09ea5d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (r *Relay) PrepareSubscription(ctx context.Context, filters Filters, opts .
cancel: cancel,
counter: int(current),
Events: make(chan *Event),
EndOfStoredEvents: make(chan struct{}),
EndOfStoredEvents: make(chan struct{}, 1),
ClosedReason: make(chan string, 1),
Filters: filters,
}
Expand Down

0 comments on commit 09ea5d5

Please sign in to comment.