Restore poller's 'accept' failed behavior.

This commit is contained in:
Xie Han
2024-03-01 19:19:20 +08:00
parent 341f66c829
commit cd98afcd6e
2 changed files with 1 additions and 3 deletions

View File

@@ -1374,6 +1374,7 @@ void *Communicator::accept(const struct sockaddr *addr, socklen_t addrlen,
delete target;
}
close(sockfd);
return NULL;
}

View File

@@ -602,10 +602,7 @@ static void __poller_handle_listen(struct __poller_node *node,
result = node->data.accept(addr, addrlen, sockfd, node->data.context);
if (!result)
{
close(sockfd);
break;
}
res->data = node->data;
res->data.result = result;