diff --git a/README.md b/README.md index 62e5f7a..cacaab2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The package can be installed as: 1. Add exstreme to your list of dependencies in `mix.exs`: def deps do - [{:exstreme, "~> 0.0.2"}] + [{:exstreme, "~> 0.0.3"}] end 2. Check the documentation: [available in Hex](https://hexdocs.pm/exstreme/doc/Exstreme.html) diff --git a/lib/exstreme/gnode/behaviour.ex b/lib/exstreme/gnode/behaviour.ex index f86c99f..f23cf97 100644 --- a/lib/exstreme/gnode/behaviour.ex +++ b/lib/exstreme/gnode/behaviour.ex @@ -45,8 +45,9 @@ defmodule Exstreme.GNode.Behaviour do end def handle_info({:send_next, next, msg}, data) do - Enum.each(next, &(GenServer.cast(&1, {:next, data, msg}))) - {:noreply, %{data | sent_counter: data.sent_counter + Enum.count(next)}} + new_data = %{data | sent_counter: data.sent_counter + Enum.count(next)} + Enum.each(next, &(GenServer.cast(&1, {:next, new_data, msg}))) + {:noreply, new_data} end def send_next(next, msg) do diff --git a/mix.exs b/mix.exs index 01134cb..17ed091 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Exstreme.Mixfile do def project do [ app: :exstreme, - version: "0.0.2", + version: "0.0.3", description: description, package: package, elixir: "~> 1.3",