1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Converted some legacy OSX network code to use atomics to avoid an asan warning

This commit is contained in:
jules 2018-10-16 16:37:28 +01:00
parent 03a118d380
commit 7d124ca74d

View file

@ -809,7 +809,8 @@ public:
{
DBG (nsStringToJuce ([error description])); ignoreUnused (error);
nsUrlErrorCode = [error code];
hasFailed = initialised = true;
hasFailed = true;
initialised = true;
signalThreadShouldExit();
}
@ -827,7 +828,8 @@ public:
void finishedLoading()
{
hasFinished = initialised = true;
hasFinished = true;
initialised = true;
signalThreadShouldExit();
}
@ -861,7 +863,7 @@ public:
NSDictionary* headers = nil;
NSInteger nsUrlErrorCode = 0;
int statusCode = 0;
bool initialised = false, hasFailed = false, hasFinished = false;
std::atomic<bool> initialised { false }, hasFailed { false }, hasFinished { false };
const int numRedirectsToFollow;
int numRedirects = 0;
int latestTotalBytes = 0;