Log actual client address

We're currently logging the server address. It should clearly be the client
address.
This commit is contained in:
Karl Seguin
2026-02-23 17:42:25 +08:00
parent 700a3e6ed9
commit 32c7399f26

View File

@@ -291,7 +291,7 @@ pub const Client = struct {
if (log.enabled(.app, .info)) {
var client_address: std.net.Address = undefined;
var socklen: posix.socklen_t = @sizeOf(net.Address);
try std.posix.getsockname(socket, &client_address.any, &socklen);
try std.posix.getpeername(socket, &client_address.any, &socklen);
log.info(.app, "client connected", .{ .ip = client_address });
}