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

View File

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