2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Expect to get E[MN]FILE errno internal_accept() [RT #18358]

This commit is contained in:
Francis Dupont
2008-07-24 09:50:21 +00:00
parent 09477e188f
commit bd7e02a337
3 changed files with 26 additions and 5 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.61 2008/07/23 23:47:07 tbox Exp $ */
/* $Id: socket.c,v 1.62 2008/07/24 09:50:21 fdupont Exp $ */
/* This code has been rewritten to take advantage of Windows Sockets
* I/O Completion Ports and Events. I/O Completion Ports is ONLY
@@ -2238,7 +2238,16 @@ internal_accept(isc_socket_t *sock, int accept_errno) {
(void *)&addrlen);
if (fd == INVALID_SOCKET) {
accept_errno = WSAGetLastError();
if (SOFT_ERROR(accept_errno) || accept_errno == WSAECONNRESET) {
if (accept_errno == WSAEMFILE) {
isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_TOOMANYFDS,
"%s: too many open file descriptors",
"accept");
goto soft_error;
} else if (SOFT_ERROR(accept_errno) ||
accept_errno == WSAECONNRESET) {
goto soft_error;
} else {
isc__strerror(accept_errno, strbuf, sizeof(strbuf));