diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-09-22 16:12:01 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-09-22 16:12:01 +0200 |
commit | df02bec2a1871267548494bc473711a0f9de9b43 (patch) | |
tree | 9e1951fca316ecd0ad48ee7428a0b33bdd79d4f0 /src/common/network/SslStream.h | |
parent | bb1cc8a48f8f3472ebdfdbaa6a97ec2e1c5190c8 (diff) |
Core/Network: Minor include cleanup in SocketConnectionInitializer related files
Diffstat (limited to 'src/common/network/SslStream.h')
-rw-r--r-- | src/common/network/SslStream.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/network/SslStream.h b/src/common/network/SslStream.h index 6bf949dcb47..47668c5003c 100644 --- a/src/common/network/SslStream.h +++ b/src/common/network/SslStream.h @@ -18,6 +18,8 @@ #ifndef TRINITYCORE_SSL_STREAM_H #define TRINITYCORE_SSL_STREAM_H +#include "Define.h" +#include "Socket.h" #include "SocketConnectionInitializer.h" #include <boost/asio/ip/tcp.hpp> #include <boost/asio/ssl/stream.hpp> @@ -25,6 +27,11 @@ namespace Trinity::Net { +namespace SslHandshakeHelpers +{ +TC_NETWORK_API void LogFailure(boost::asio::ip::address const& ipAddress, uint16 port, boost::system::error_code const& error); +} + template <typename SocketImpl> struct SslHandshakeConnectionInitializer final : SocketConnectionInitializer { @@ -41,13 +48,12 @@ struct SslHandshakeConnectionInitializer final : SocketConnectionInitializer if (error) { - TC_LOG_ERROR("session", "{} SSL Handshake failed {}", socket->GetClientInfo(), error.message()); + SslHandshakeHelpers::LogFailure(socket->GetRemoteIpAddress(), socket->GetRemotePort(), error); socket->CloseSocket(); return; } - if (self->next) - self->next->Start(); + self->InvokeNext(); }); } |