From c1b33533da7aa1400488519dc41b1720821bb6c4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Aug 2018 13:22:25 +0200 Subject: [PATCH] event/ServerSocket: fix get_remote_uid() call This call was broken since commit 9a5bcc6db0c58459b63d25fede1945b7ebef67a8 because the `UniqueSocketDescriptor` had already been moved. --- src/event/ServerSocket.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 93e9e911f..4e00ac41b 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -163,8 +163,9 @@ OneServerSocket::Accept() noexcept (const char *)msg); } - parent.OnAccept(std::move(peer_fd), peer_address, - get_remote_uid(peer_fd.Get())); + const auto uid = get_remote_uid(peer_fd.Get()); + + parent.OnAccept(std::move(peer_fd), peer_address, uid); } bool