From c9dce154fd1fdeba4f7872bb01e6c54fd7ec3807 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 5 May 2013 08:42:08 +0000 Subject: [PATCH] * add boolean that can be changed to avoid shutting down winsock. This can trouble other DLLs. Mantis #22597 git-svn-id: trunk@24446 - --- rtl/win/sockets.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rtl/win/sockets.pp b/rtl/win/sockets.pp index 2841f08cc0..b857bf6e6a 100644 --- a/rtl/win/sockets.pp +++ b/rtl/win/sockets.pp @@ -53,6 +53,10 @@ const {$i socketsh.inc} {$i fpwinsockh.inc} +// finalizing Winsock2 stack might upset other DLLS. Mantis #22597 +var + NoWinsockCleanupCall : Boolean = false; + Implementation { Include filerec and textrec structures } @@ -276,5 +280,6 @@ var initialization WSAStartUp(WINSOCK_VERSION,wsadata); finalization - WSACleanUp; + If Not NoWinsockCleanupCall Then + WSACleanUp; end.