25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

catch badarg exceptions on invalid callback procs

This commit is contained in:
Frank Diebolt 2019-01-31 18:14:36 +01:00
parent 9b66894dda
commit 4ff4711d4f

View 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.