Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pokémon clauses for unknown messages #9

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.1 - 2024-06-26

### Fixed

- Ignored unknown info messages in `Volley.InOrderSubscription` and
`Volley.PersistentSubscription`.
- This protects against the `{:caught_up, reference()}` and
`{:fell_behind, reference()}` notifications introduced in
EventStore 23.10 and later.

## 1.0.0 - 2022-05-11

This change represents stability in the API. There is no functional change
Expand Down
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
7 changes: 7 additions & 0 deletions lib/volley/persistent_subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ defmodule Volley.PersistentSubscription do
{:noreply, [map_event(event, state)], state}
end

# coveralls-ignore-start
def handle_info(_, state) do
{:noreply, [], state}
end

# coveralls-ignore-stop

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