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
1 changed files with 2 additions and 2 deletions

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),