net/UniqueSocketDescriptor: use AdoptTag in the constructors that adopt ownership
This makes it a little bit harder to use the ownershop-adopting constructors accidently.
This commit is contained in:
committed by
Max Kellermann
parent
131263cbe3
commit
765a6a2f20
@@ -130,7 +130,7 @@ inline void
|
||||
ServerSocket::OneServerSocket::Accept() noexcept
|
||||
{
|
||||
StaticSocketAddress peer_address;
|
||||
UniqueSocketDescriptor peer_fd(event.GetSocket().AcceptNonBlock(peer_address));
|
||||
UniqueSocketDescriptor peer_fd{AdoptTag{}, event.GetSocket().AcceptNonBlock(peer_address)};
|
||||
if (!peer_fd.IsDefined()) {
|
||||
const SocketErrorMessage msg;
|
||||
FmtError(server_socket_domain,
|
||||
|
||||
Reference in New Issue
Block a user