[PATCH] wininet: Close sockets open in http requests
Nigel Liang
ncliang at gmail.com
Sun Oct 14 01:37:39 CDT 2007
Hi,
Http requests open sockets and forget to close them. Left running over a long
period, the socket file descriptor starts getting large. Once it exceeds
FD_SETSIZE, the behavior becomes unpredictable and results in funcky crashes.
-Nigel
---
dlls/wininet/internet.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 0edca74..8e3a98e 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -1014,6 +1014,9 @@ BOOL WINAPI InternetCloseHandle(HINTERNE
return FALSE;
}
+ if (lpwh->htype == WH_HHTTPREQ)
+ NETCON_close(&((LPWININETHTTPREQW)lpwh)->netConnection);
+
WININET_Release( lpwh );
WININET_FreeHandle( hInternet );
--
1.4.1
More information about the wine-patches
mailing list