]> granicus.if.org Git - ejabberd/commitdiff
Report TLS errors
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 3 Mar 2015 10:32:04 +0000 (13:32 +0300)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 20 Mar 2015 09:39:14 +0000 (10:39 +0100)
src/ejabberd_receiver.erl

index 819e6d8982b3def761ad0cd68fd81322cd1b7812..f63ae1ccb916781cd59f072e7475192a98813e81 100644 (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