Index: net/base/winsock_init.cc |
diff --git a/net/base/winsock_init.cc b/net/base/winsock_init.cc |
index e7601859e78ac4ccaceee63cccbb16ec155c0b93..1f488c96c6bf2459e99aa5f008a69fa3985c9c5e 100644 |
--- a/net/base/winsock_init.cc |
+++ b/net/base/winsock_init.cc |
@@ -30,15 +30,12 @@ class WinsockInitSingleton { |
WSAGetLastError(); |
} |
} |
- |
- ~WinsockInitSingleton() { |
gab
2016/07/27 14:29:17
On the bug when I said "delete the destructor" I m
gab
2016/08/09 16:46:32
ping, I think this would be cleaner, can you do th
|
- // Don't call WSACleanup() since the worker pool threads can continue to |
- // call getaddrinfo() after Winsock has shutdown, which can lead to crashes. |
- } |
}; |
-static base::LazyInstance<WinsockInitSingleton> g_winsock_init_singleton = |
- LAZY_INSTANCE_INITIALIZER; |
+// Worker pool threads that use the Windows Sockets API may still be running at |
+// shutdown. Leak instance and skip cleanup. |
+static base::LazyInstance<WinsockInitSingleton>::Leaky |
+ g_winsock_init_singleton = LAZY_INSTANCE_INITIALIZER; |
} // namespace |