aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/socket_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/socket_windows.c')
-rw-r--r--src/core/iomgr/socket_windows.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/iomgr/socket_windows.c b/src/core/iomgr/socket_windows.c
index e4ba0a2b66..fbf3fdc949 100644
--- a/src/core/iomgr/socket_windows.c
+++ b/src/core/iomgr/socket_windows.c
@@ -85,13 +85,13 @@ int grpc_winsocket_shutdown(grpc_winsocket *socket) {
both memory and sockets. */
void grpc_winsocket_orphan(grpc_winsocket *winsocket) {
SOCKET socket = winsocket->socket;
+ grpc_iomgr_unregister_object(&winsocket->iomgr_object);
if (winsocket->read_info.outstanding || winsocket->write_info.outstanding) {
grpc_iocp_socket_orphan(winsocket);
} else {
grpc_winsocket_destroy(winsocket);
}
closesocket(socket);
- grpc_iomgr_unregister_object(&winsocket->iomgr_object);
}
void grpc_winsocket_destroy(grpc_winsocket *winsocket) {