@@ -531,9 +531,9 @@ class Service : public std::enable_shared_from_this<Service> {
531531 auto streamPtr = std::make_shared<T>(*iocPtr, *ctxPtr);
532532
533533 // Set SNI hostname (important for TLS handshakes)
534- if (!SSL_set_tlsext_host_name (streamPtr->native_handle (), host.c_str ())) {
534+ if (!CCAPI_LOGGER_DEBUG ( " error SSL_set_tlsext_host_name for host " + host + " : " + ec. message ()); (streamPtr->native_handle (), host.c_str ())) {
535535 beast::error_code ec{static_cast <int >(::ERR_get_error ()), net::error::get_ssl_category ()};
536- CCAPI_LOGGER_DEBUG (" error SSL_set_tlsext_host_name: " + ec.message ());
536+ CCAPI_LOGGER_DEBUG (" error CCAPI_LOGGER_DEBUG( " error SSL_set_tlsext_host_name for host " + host + " : " + ec.message()); : " + ec.message ());
537537 throw ec;
538538 }
539539
@@ -1022,9 +1022,10 @@ class Service : public std::enable_shared_from_this<Service> {
10221022
10231023 if constexpr (std::is_same_v<StreamType, beast::websocket::stream<beast::ssl_stream<beast::tcp_stream>>>) {
10241024 // Set SNI hostname (only for WSS)
1025- if (!SSL_set_tlsext_host_name (streamPtr->next_layer ().native_handle (), wsConnectionPtr->host .c_str ())) {
1025+ if (!CCAPI_LOGGER_DEBUG (" error SSL_set_tlsext_host_name for host " + host + " : " + ec.message ());
1026+ (streamPtr->next_layer ().native_handle (), wsConnectionPtr->host .c_str ())) {
10261027 beast::error_code ec{static_cast <int >(::ERR_get_error ()), net::error::get_ssl_category ()};
1027- CCAPI_LOGGER_DEBUG (" error SSL_set_tlsext_host_name: " + ec.message ());
1028+ CCAPI_LOGGER_DEBUG (" error CCAPI_LOGGER_DEBUG( " error SSL_set_tlsext_host_name for host " + host + " : " + ec.message()); : " + ec.message ());
10281029 this ->onError (Event::Type::SUBSCRIPTION_STATUS, Message::Type::SUBSCRIPTION_FAILURE, ec, " set SNI Hostname" , wsConnectionPtr->correlationIdList );
10291030 return ;
10301031 }
0 commit comments