25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

According to fast_tls, only atom and binary may accompany error tuple

This commit is contained in:
Badlop 2021-02-11 20:34:21 +01:00
parent 7b8bd960c6
commit e3fd120fd4

View File

@ -956,8 +956,7 @@ recv_data({fast_tls, Sock}, Data) ->
case fast_tls:recv_data(Sock, Data) of case fast_tls:recv_data(Sock, Data) of
{ok, _} = OK -> OK; {ok, _} = OK -> OK;
{error, E} when is_atom(E) -> {error, {socket, E}}; {error, E} when is_atom(E) -> {error, {socket, E}};
{error, E} when is_binary(E) -> {error, {tls, E}}; {error, E} when is_binary(E) -> {error, {tls, E}}
{error, _} = Err -> Err
end; end;
recv_data(_, Data) -> recv_data(_, Data) ->
{ok, Data}. {ok, Data}.