From 5c94b56ed2b2699867800daeaaef91fab7157bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= Date: Tue, 21 Feb 2017 17:15:40 +0100 Subject: [PATCH] Unwrap real socket for SSL info Part of rabbitmq/rabbitmq-server#589 --- src/amqp_direct_connection.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amqp_direct_connection.erl b/src/amqp_direct_connection.erl index 7dbf4891..f10c0c5b 100644 --- a/src/amqp_direct_connection.erl +++ b/src/amqp_direct_connection.erl @@ -190,8 +190,9 @@ socket_adapter_info(Sock, Protocol) -> additional_info = maybe_ssl_info(Sock)}. maybe_ssl_info(Sock) -> - case rabbit_net:is_ssl(Sock) of - true -> [{ssl, true}] ++ ssl_info(Sock) ++ ssl_cert_info(Sock); + RealSocket = rabbit_net:unwrap_socket(Sock), + case rabbit_net:is_ssl(RealSocket) of + true -> [{ssl, true}] ++ ssl_info(RealSocket) ++ ssl_cert_info(RealSocket); false -> [{ssl, false}] end.