25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-10 16:58:46 +01:00

Return send() result to the caller

This commit is contained in:
Evgeniy Khramtsov 2017-12-28 14:01:34 +03:00
parent 8918227fc3
commit 23c5fd9a4f

View File

@ -801,8 +801,8 @@ receiver(NS, Owner, Socket, MRef) ->
Owner ! {Ref, ok},
receiver(NS, Owner, ZlibSocket, MRef);
{Ref, {send_text, Text}} ->
ok = xmpp_socket:send(Socket, Text),
Owner ! {Ref, ok},
Ret = xmpp_socket:send(Socket, Text),
Owner ! {Ref, Ret},
receiver(NS, Owner, Socket, MRef);
{Ref, close} ->
xmpp_socket:close(Socket),