]> granicus.if.org Git - ejabberd/commitdiff
catch badarg exceptions on invalid callback procs
authorFrank Diebolt <frank.diebolt@al-enterprise.com>
Thu, 31 Jan 2019 17:14:36 +0000 (18:14 +0100)
committerFrank Diebolt <frank.diebolt@al-enterprise.com>
Thu, 31 Jan 2019 17:14:36 +0000 (18:14 +0100)
src/ejabberd_iq.erl

index fd24aec4b5971f892be9bc0402289f8176bfb784..aeaffccde33de31769e53c2f026628bb7a526f0f 100644 (file)
@@ -173,4 +173,8 @@ calc_checksum(Data) ->
 callback(undefined, IQRes, Fun) ->
     Fun(IQRes);
 callback(Proc, IQRes, Ctx) ->
-    catch Proc ! {iq_reply, IQRes, Ctx}.
+    try
+        Proc ! {iq_reply, IQRes, Ctx}
+    catch _:badarg ->
+        ok
+    end.