Skip to content

Commit

Permalink
Add pokémon clauses for unknown info messages
Browse files Browse the repository at this point in the history
This is meant to protect against CaughtUp/FellBehind notifications
introduced in
<EventStore/EventStore@80d6546#diff-3f4777412535c46201e919412884d13ba6036db276eefe40ba84b8089b0c58f4>
but it should be safe to ignore any other unknown info notifications as
well.
  • Loading branch information
the-mikedavis committed Jun 26, 2024
1 parent 023682e commit a2a4628
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/volley/in_order_subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ defmodule Volley.InOrderSubscription do
{:stop, reason, state}
end

def handle_info(_, state) do
{:noreply, [], state}
end

# coveralls-ignore-stop

defp read_stream(state, demand) do
Expand Down
4 changes: 4 additions & 0 deletions lib/volley/persistent_subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ defmodule Volley.PersistentSubscription do
{:noreply, [map_event(event, state)], state}
end

def handle_info(_, state) do
{:noreply, [], state}
end

@impl GenStage
def handle_demand(_demand, state) do
{:noreply, [], state}
Expand Down

0 comments on commit a2a4628

Please sign in to comment.