mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 03:19:02 +08:00
Always use SOCK_CLOEXEC in tcp client
This commit is contained in:
@@ -75,11 +75,7 @@ public:
|
||||
int last_errno = 0;
|
||||
for (auto *rp = addrinfo_result; rp != nullptr; rp = rp->ai_next)
|
||||
{
|
||||
#ifdef SPDLOG_PREVENT_CHILD_FD
|
||||
int const flags = SOCK_CLOEXEC;
|
||||
#else
|
||||
int const flags = 0;
|
||||
#endif
|
||||
socket_ = ::socket(rp->ai_family, rp->ai_socktype | flags, rp->ai_protocol);
|
||||
if (socket_ == -1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user