diff options
Diffstat (limited to 'src/core/iomgr/socket_windows.c')
-rw-r--r-- | src/core/iomgr/socket_windows.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/iomgr/socket_windows.c b/src/core/iomgr/socket_windows.c index 92fcf7de2a..f0bd0d8d69 100644 --- a/src/core/iomgr/socket_windows.c +++ b/src/core/iomgr/socket_windows.c @@ -62,17 +62,16 @@ grpc_winsocket *grpc_winsocket_create(SOCKET socket) { int grpc_winsocket_shutdown(grpc_winsocket *socket) { int callbacks_set = 0; gpr_mu_lock(&socket->state_mu); - socket->shutdown_iocb.is_ext_managed = 1; /* GPR_TRUE */ if (socket->read_info.cb) { callbacks_set++; - socket->shutdown_iocb.cb = socket->read_info.cb; - socket->shutdown_iocb.cb_arg = socket->read_info.opaque; + grpc_iomgr_closure_init(&socket->shutdown_iocb, socket->read_info.cb, + socket->read_info.opaque); grpc_iomgr_add_delayed_callback(socket->shutdown_iocb, 0); } if (socket->write_info.cb) { callbacks_set++; - socket->shutdown_iocb.cb = socket->write_info.cb; - socket->shutdown_iocb.cb_arg = socket->write_info.opaque; + grpc_iomgr_closure_init(&socket->shutdown_iocb, socket->write_info.cb, + socket->write_info.opaque); grpc_iomgr_add_delayed_callback(socket->shutdown_iocb, 0); } gpr_mu_unlock(&socket->state_mu); |