diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index fd0f5a852c..0808e49d1b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3405,6 +3405,8 @@ rb_w32_fclose(FILE *fp) } _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE); fclose(fp); + shutdown(sock, 0); + shutdown(sock, 1); if (closesocket(sock) == SOCKET_ERROR) { errno = map_errno(WSAGetLastError()); return -1; @@ -3421,6 +3423,8 @@ rb_w32_close(int fd) UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN); return _close(fd); } + shutdown(sock, 0); + shutdown(sock, 1); if (closesocket(sock) == SOCKET_ERROR) { errno = map_errno(WSAGetLastError()); return -1; |