event/ServerSocket: pass UniqueSocketDescriptor by value

Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
This commit is contained in:
Max Kellermann
2017-11-10 20:43:14 +01:00
parent 5fd2b7cc79
commit 0ff4350352
8 changed files with 13 additions and 12 deletions

View File

@@ -186,7 +186,7 @@ HttpdClient::SendResponse()
return true;
}
HttpdClient::HttpdClient(HttpdOutput &_httpd, UniqueSocketDescriptor &&_fd,
HttpdClient::HttpdClient(HttpdOutput &_httpd, UniqueSocketDescriptor _fd,
EventLoop &_loop,
bool _metadata_supported)
:BufferedSocket(_fd.Release(), _loop),