Fix filter_nodes

The previous implementation always returned an empty list while testing
it. However I don't really understand why that happened. The list
comprehension based one works, although it looks equivalent to me.
This commit is contained in:
Jonah Brüchert 2022-07-02 20:20:24 +02:00 committed by badlop
parent 0faf34b26d
commit 9a8a843724
1 changed files with 2 additions and 4 deletions

View File

@ -593,10 +593,8 @@ known_nodes() ->
-spec filter_nodes([binary()]) -> [binary()].
filter_nodes(Nodes) ->
lists:filter(
fun(Node) ->
lists:member(Node, Nodes)
end, known_nodes()).
KnownNodes = known_nodes(),
[Node || KnownNode <- KnownNodes, Node <- Nodes, KnownNode == Node].
-spec multicast(module(), binary(), binary(),
binary(), binary(), fun((jid()) -> message())) -> ok.