Fix misleading TLS handshake error logging

The log message on TLS handshake errors always stated that a client handshake
failed, even if if the connection was acting as the server. The commit changes
it so that the actual role is taken into account.
This commit is contained in:
Julian Brost 2026-04-16 12:24:14 +02:00
parent 647b2b2101
commit 1b33451665

View file

@ -743,7 +743,8 @@ void ApiListener::NewClientHandlerInternal(
}
Log(LogCritical, "ApiListener")
<< "Client TLS handshake failed (" << conninfo << "): " << ec.message();
<< (role == RoleClient ? "Client" : "Server")
<< " TLS handshake failed (" << conninfo << "): " << ec.message();
return;
}