Commit 51a97c31 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Add a safety net to NetworkSocket::fromFd

Summary: The codemod tooling has demonstrated issues distinguishing between integer and bool overloads, so add a safety net just in case.

Reviewed By: yfeldblum

Differential Revision: D13995489

fbshipit-source-id: 2a853f8c961953d4cdd24256420ecc29cb13c677
parent add0a129
......@@ -41,6 +41,8 @@ struct NetworkSocket {
constexpr NetworkSocket() : data(invalid_handle_value) {}
constexpr explicit NetworkSocket(native_handle_type d) : data(d) {}
template <typename T>
static NetworkSocket fromFd(T) = delete;
static NetworkSocket fromFd(int fd) {
return NetworkSocket(
netops::detail::SocketFileDescriptorMap::fdToSocket(fd));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment