Not using a non blocking socket, instead using the non blocking write methods
This commit is contained in:
parent
e9388e5e5e
commit
f14e5e0148
@ -501,7 +501,7 @@ void LocalFileTransfer::callback_transfer_network_accept(int fd, short, void *pt
|
|||||||
|
|
||||||
sockaddr_storage address{};
|
sockaddr_storage address{};
|
||||||
socklen_t address_length{sizeof(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) {
|
if(client_fd <= 0) {
|
||||||
/* TODO: Reserve one file descriptor in case of out of file descriptors (see current implementation) */
|
/* 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));
|
logError(LOG_FT, "Failed to accept new client: {}/{}", errno, strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user