mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[WININET]
- Disable connection keep-alive to avoid calling into msafd to close the connection later during DLL_PROCESS_DETACH svn path=/trunk/; revision=54263
This commit is contained in:
parent
ae2c3ea022
commit
48f72b0826
2 changed files with 49 additions and 0 deletions
|
@ -245,8 +245,17 @@ void server_release(server_t *server)
|
||||||
if(InterlockedDecrement(&server->ref))
|
if(InterlockedDecrement(&server->ref))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
if(!server->ref)
|
if(!server->ref)
|
||||||
server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
|
server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
|
||||||
|
#else
|
||||||
|
EnterCriticalSection(&connection_pool_cs);
|
||||||
|
list_remove(&server->entry);
|
||||||
|
LeaveCriticalSection(&connection_pool_cs);
|
||||||
|
|
||||||
|
heap_free(server->name);
|
||||||
|
heap_free(server);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
|
static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
|
||||||
|
@ -1861,6 +1870,7 @@ static void http_release_netconn(http_request_t *req, BOOL reuse)
|
||||||
if(!req->netconn)
|
if(!req->netconn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
if(reuse && req->netconn->keep_alive) {
|
if(reuse && req->netconn->keep_alive) {
|
||||||
BOOL run_collector;
|
BOOL run_collector;
|
||||||
|
|
||||||
|
@ -1893,6 +1903,7 @@ static void http_release_netconn(http_request_t *req, BOOL reuse)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
|
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
|
||||||
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
|
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
|
||||||
|
|
|
@ -92,3 +92,41 @@ Index: dll/win32/wininet/urlcache.c
|
||||||
for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++)
|
for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++)
|
||||||
{
|
{
|
||||||
WCHAR wszCachePath[MAX_PATH];
|
WCHAR wszCachePath[MAX_PATH];
|
||||||
|
Index: dll/win32/wininet/http.c
|
||||||
|
===================================================================
|
||||||
|
--- dll/win32/wininet/http.c (revision 54234)
|
||||||
|
+++ dll/win32/wininet/http.c (working copy)
|
||||||
|
@@ -245,8 +245,17 @@
|
||||||
|
if(InterlockedDecrement(&server->ref))
|
||||||
|
return;
|
||||||
|
|
||||||
|
+#ifndef __REACTOS__
|
||||||
|
if(!server->ref)
|
||||||
|
server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME;
|
||||||
|
+#else
|
||||||
|
+ EnterCriticalSection(&connection_pool_cs);
|
||||||
|
+ list_remove(&server->entry);
|
||||||
|
+ LeaveCriticalSection(&connection_pool_cs);
|
||||||
|
+
|
||||||
|
+ heap_free(server->name);
|
||||||
|
+ heap_free(server);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static server_t *get_server(const WCHAR *name, INTERNET_PORT port)
|
||||||
|
@@ -1861,6 +1870,7 @@
|
||||||
|
if(!req->netconn)
|
||||||
|
return;
|
||||||
|
|
||||||
|
+#ifndef __REACTOS__
|
||||||
|
if(reuse && req->netconn->keep_alive) {
|
||||||
|
BOOL run_collector;
|
||||||
|
|
||||||
|
@@ -1893,6 +1903,7 @@
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
|
||||||
|
INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
|
Loading…
Reference in a new issue