Skip to content
Browse files

Correctly set filter on subscribe.

  • Loading branch information...
1 parent 5af78fc commit a4dd4eb5aedc47fd109ac06e231c11025d68670f @archaelus committed Mar 9, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/pubsub.erl
View
3 src/pubsub.erl
@@ -51,7 +51,8 @@ add_subscriber(Pid, Fn, P = #pubsub{subscribers=Subs})
Fn =:= ?FILTER_ALL; is_function(Fn, 1) ->
case subscribed(Pid, P) of
false ->
- P#pubsub{subscribers=[#sub{pid=Pid} | Subs]};
+ P#pubsub{subscribers=[#sub{pid=Pid,
+ filter = Fn} | Subs]};
true ->
P
end.

0 comments on commit a4dd4eb

Please sign in to comment.
Something went wrong with that request. Please try again.