diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-05-29 20:10:04 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-05-29 20:10:55 +0300 |
commit | 71f6b139f8de3ea6bf2b925e095fc0f7864c0274 (patch) | |
tree | fb6613a0e6d7746c3a5136ebdf3034b16796c25e /indra/llmessage/llproxy.h | |
parent | ed3d9abdd01304b5a9708880d9b150fb6568256b (diff) |
SL-13348 Thread crashing singleton #1
Diffstat (limited to 'indra/llmessage/llproxy.h')
-rw-r--r-- | indra/llmessage/llproxy.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llmessage/llproxy.h b/indra/llmessage/llproxy.h index 87891901ad..f2eefb26d0 100644 --- a/indra/llmessage/llproxy.h +++ b/indra/llmessage/llproxy.h @@ -225,6 +225,8 @@ class LLProxy: public LLSingleton<LLProxy> LLSINGLETON(LLProxy); LOG_CLASS(LLProxy); + /*virtual*/ void initSingleton(); + public: // Static check for enabled status for UDP packets. Call from main thread only. static bool isSOCKSProxyEnabled() { return sUDPProxyEnabled; } @@ -250,7 +252,7 @@ public: // Apply the current proxy settings to a curl request. Doesn't do anything if mHTTPProxyEnabled is false. // Safe to call from any thread. - void applyProxySettings(CURL* handle); + static void applyProxySettings(CURL* handle); // Start a connection to the SOCKS 5 proxy. Call from main thread only. S32 startSOCKSProxy(LLHost host); @@ -343,6 +345,10 @@ private: /*########################################################################################### END OF SHARED MEMBERS ###########################################################################################*/ + + // A hack to get arround getInstance() and capture_dependency() which are unsafe to use inside threads + // set/reset on init/cleanup, strictly for use in applyProxySettings + static LLProxy* sProxyInstance; }; #endif |