]> granicus.if.org Git - ejabberd/commitdiff
Return `true` or `false` from send() callback
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 5 Jan 2018 09:15:28 +0000 (12:15 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 5 Jan 2018 09:15:28 +0000 (12:15 +0300)
Fixes #2209

src/ejabberd_cluster_mnesia.erl

index 3945c2d1bae3e970595dfbdae2c008f2b5529ffe..84a707627212f99f3c453e9419385e54e0a2468d 100644 (file)
@@ -114,7 +114,10 @@ get_node_by_id(Hash) ->
 
 -spec send({atom(), node()}, term()) -> boolean().
 send(Dst, Msg) ->
-    erlang:send(Dst, Msg).
+    case erlang:send(Dst, Msg, [nosuspend, noconnect]) of
+       ok -> true;
+       _ -> false
+    end.
 
 -spec wait_for_sync(timeout()) -> ok.
 wait_for_sync(Timeout) ->