Commit 63f8affa authored by jan.koester's avatar jan.koester
Browse files

better

parent de519842
Loading
Loading
Loading
Loading
+6 −2
Changes for src/event/iocp.cpp: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -413,13 +413,17 @@ namespace netplus {
			}
		}

		for (auto i = threadpool.begin(); i != threadpool.end(); ++i) {
		// Cleanup
		for (int i = 0; i < threads; ++i) {
			PostQueuedCompletionStatus(
				iocp,               // The global IOCP Handle
				iocp, // The IOCP Handle
				0,    // dwNumberOfBytesTransferred (0 for exit)
				0,    // lpCompletionKey (0 is safe for exit signal)
				NULL  // lpOverlapped (NULL for exit signal)
			);
		}

		for (auto i = threadpool.begin(); i != threadpool.end(); ++i) {
			i->join();
		}
	}