mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Restore poller's 'accept' failed behavior.
This commit is contained in:
@@ -1374,6 +1374,7 @@ void *Communicator::accept(const struct sockaddr *addr, socklen_t addrlen,
|
||||
delete target;
|
||||
}
|
||||
|
||||
close(sockfd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user