Skip to content

Commit

Permalink
fix name determination in init callback
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Jun 4, 2021
1 parent d58e8b2 commit 1609eaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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).

## 0.3.1 - 2021-06-04

### Fixed

- Fixed name determination for InOrder subscriptions

## 0.3.0 - 2021-06-04

### Added
Expand Down
3 changes: 2 additions & 1 deletion lib/volley/in_order_subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,12 @@ defmodule Volley.InOrderSubscription do

@impl GenStage
def init(opts) do
self = Keyword.get(opts, :name, self())
{producer_opts, opts} = pop_producer_opts(opts)

state =
struct(__MODULE__, opts)
|> Map.put(:self, Keyword.get(opts, :name, self()))
|> Map.put(:self, self)

{:producer, state, producer_opts}
end
Expand Down

0 comments on commit 1609eaf

Please sign in to comment.