Skip to content

Commit

Permalink
fix with the counters
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkaspa committed Jul 27, 2016
1 parent 4497d03 commit f4754a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions lib/exstreme/gnode/behaviour.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f4754a8

Please sign in to comment.