mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Fixed bugs in thread termination code.
This commit is contained in:
parent
f837ac123d
commit
6e94ae1a6b
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ SRC_FILES := changes.txt license.txt Makefile mkstubs.pl readme.txt src/config.h
|
|||||||
all: ipxwrapper.dll wsock32.dll mswsock.dll ipxconfig.exe dpwsockx.dll
|
all: ipxwrapper.dll wsock32.dll mswsock.dll ipxconfig.exe dpwsockx.dll
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ipxwrapper.dll wsock32.dll mswsock.dll ipxconfig.exe
|
rm -f ipxwrapper.dll wsock32.dll mswsock.dll ipxconfig.exe dpwsockx.dll
|
||||||
rm -f src/*.o src/*_stubs.s
|
rm -f src/*.o src/*_stubs.s
|
||||||
|
|
||||||
dist: all
|
dist: all
|
||||||
|
@ -413,6 +413,7 @@ static HRESULT WINAPI IPX_ShutdownEx(LPDPSP_SHUTDOWNDATA data) {
|
|||||||
TerminateThread(sp_data->worker_thread, 0);
|
TerminateThread(sp_data->worker_thread, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CloseHandle(sp_data->worker_thread);
|
||||||
sp_data->worker_thread = NULL;
|
sp_data->worker_thread = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,12 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
|||||||
|
|
||||||
LeaveCriticalSection(&(router->crit_sec));
|
LeaveCriticalSection(&(router->crit_sec));
|
||||||
|
|
||||||
WaitForSingleObject(router_thread, INFINITE);
|
if(WaitForSingleObject(router_thread, 3000) == WAIT_TIMEOUT) {
|
||||||
|
log_printf("Router thread didn't exit in 3 seconds, killing");
|
||||||
|
TerminateThread(router_thread, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseHandle(router_thread);
|
||||||
router_thread = NULL;
|
router_thread = NULL;
|
||||||
|
|
||||||
router_destroy(router);
|
router_destroy(router);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user