Skip to content

Commit 1e8a8c8

Browse files
author
Massimo Cesaro
committed
catch missing module
1 parent 24a00a7 commit 1e8a8c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
erlang 26.0

src/partisan_plumtree_broadcast.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,11 @@ handle_cast({broadcast, MessageId, Message, Mod, Round, Root, From}, State) ->
546546
"received {broadcast, ~p, Msg, ~p, ~p, ~p, ~p}",
547547
[MessageId, Mod, Round, Root, From]
548548
),
549-
Valid = Mod:merge(MessageId, Message),
549+
Valid =
550+
case catch Mod:merge(MessageId, Message) of
551+
Resp when is_atom(Resp) andalso true == Resp orelse false == Resp -> Resp;
552+
_ -> false
553+
end,
550554
State1 = handle_broadcast(Valid, MessageId, Message, Mod, Round, Root, From, State),
551555
{noreply, State1};
552556

0 commit comments

Comments
 (0)