diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 8964964102..cf101189f8 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -337,7 +337,6 @@ struct isc_socketmgr { HANDLE hIoCompletionPort; int maxIOCPThreads; HANDLE hIOCPThreads[MAX_IOCPTHREADS]; - DWORD dwIOCPThreadIds[MAX_IOCPTHREADS]; size_t maxudp; /* @@ -500,15 +499,8 @@ iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) { * We need at least one */ for (i = 0; i < total_threads; i++) { - manager->hIOCPThreads[i] = - CreateThread(NULL, 0, SocketIoThread, manager, 0, - &manager->dwIOCPThreadIds[i]); - if (manager->hIOCPThreads[i] == NULL) { - errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, - "Can't create IOCP thread: %s", strbuf); - } + isc_thread_create(SocketIoThread, manager, + &manager->hIOCPThreads[i]); } }