diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index 4443a6a9a78324f3e5b5689239e7a474a352d2e0..c3f310ee27f518d9fc6b0b71901228174cd7c0bd 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -35,6 +35,7 @@ #ifdef GPR_WINSOCK_SOCKET +#include <grpc/support/log.h> #include <grpc/support/thd.h> #include "src/core/iomgr/timer_internal.h" @@ -123,7 +124,14 @@ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, void grpc_pollset_destroy(grpc_pollset *pollset) {} -void grpc_pollset_reset(grpc_pollset *pollset) {} +void grpc_pollset_reset(grpc_pollset *pollset) { + GPR_ASSERT(pollset->shutting_down); + GPR_ASSERT(!has_workers(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET)); + pollset->shutting_down = 0; + pollset->is_iocp_worker = 0; + pollset->kicked_without_pollers = 0; + pollset->on_shutdown = NULL; +} void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec now,