In any case this function is run only once on each node (line 33): all pending messages are canceled (lines 36-37) and the decision is published (line 40) with a unique message identifier that is produced using grpId as a seed (line 39).
if several nodes make a decision in the same session, all messages carrying this decision will have the same identifier and will thus be considered as du­plicates of the same message by the communication layer.