Not using a non blocking socket, instead using the non blocking write methods

This commit is contained in:
WolverinDEV 2020-08-01 12:07:52 +02:00
parent e9388e5e5e
commit f14e5e0148

View File

@ -501,7 +501,7 @@ void LocalFileTransfer::callback_transfer_network_accept(int fd, short, void *pt
sockaddr_storage address{};
socklen_t address_length{sizeof(address)};
auto client_fd = ::accept4(fd, reinterpret_cast<sockaddr*>(&address), &address_length, SOCK_NONBLOCK);
auto client_fd = ::accept4(fd, reinterpret_cast<sockaddr*>(&address), &address_length, 0); //SOCK_NONBLOCK
if(client_fd <= 0) {
/* TODO: Reserve one file descriptor in case of out of file descriptors (see current implementation) */
logError(LOG_FT, "Failed to accept new client: {}/{}", errno, strerror(errno));