summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/windows/Socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/windows/Socket.cpp')
-rw-r--r--cpp/src/qpid/sys/windows/Socket.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/windows/Socket.cpp b/cpp/src/qpid/sys/windows/Socket.cpp
index a4374260cc..17e3212a46 100644
--- a/cpp/src/qpid/sys/windows/Socket.cpp
+++ b/cpp/src/qpid/sys/windows/Socket.cpp
@@ -24,6 +24,7 @@
#include "qpid/sys/SocketAddress.h"
#include "qpid/sys/windows/check.h"
#include "qpid/sys/windows/IoHandlePrivate.h"
+#include "qpid/sys/SystemInfo.h"
// Ensure we get all of winsock2.h
#ifndef _WIN32_WINNT
@@ -67,7 +68,8 @@ public:
}
~WinSockSetup() {
- WSACleanup();
+ if (SystemInfo::threadSafeShutdown())
+ WSACleanup();
}
public: