Report TLS errors

This commit is contained in:
Evgeniy Khramtsov 2015-03-03 13:32:04 +03:00 committed by Christophe Romain
parent 7976d3eb48
commit 51508a9fc3
1 changed files with 7 additions and 1 deletions

View File

@ -243,7 +243,13 @@ handle_info({Tag, _TCPSocket, Data},
{ok, TLSData} ->
{noreply, process_data(TLSData, State),
?HIBERNATE_TIMEOUT};
{error, _Reason} -> {stop, normal, State}
{error, Reason} ->
if is_binary(Reason) ->
?ERROR_MSG("TLS error = ~s", [Reason]);
true ->
ok
end,
{stop, normal, State}
end;
ezlib ->
case ezlib:recv_data(Socket, Data) of