Skip to content

Commit

Permalink
Don't fail on PEP unsubscribe
Browse files Browse the repository at this point in the history
Don't crash if a PEP node is explicitly unsubscribed.  This fixes a
regression introduced by 45eb491.

Thanks to Melvin Keskin for reporting the bug.
  • Loading branch information
weiss committed Mar 16, 2021
1 parent 14c8e12 commit 7008ae2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node_pep.erl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel,
unsubscribe_node(Nidx, Sender, Subscriber, SubId) ->
case node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId) of
{error, Error} -> {error, Error};
{result, _} -> {result, []}
{result, _} -> {result, default}
end.

publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) ->
Expand Down
2 changes: 1 addition & 1 deletion src/node_pep_sql.erl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel,
unsubscribe_node(Nidx, Sender, Subscriber, SubId) ->
case node_flat_sql:unsubscribe_node(Nidx, Sender, Subscriber, SubId) of
{error, Error} -> {error, Error};
{result, _} -> {result, []}
{result, _} -> {result, default}
end.

publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) ->
Expand Down

0 comments on commit 7008ae2

Please sign in to comment.