Browse Source

macOS/iOS: Workaround an Apple bug which could result in a race-condition when accessing a WebInputStream from multiple threads

tags/2021-05-28
hogliux 7 years ago
parent
commit
975b242987
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/juce_core/native/juce_mac_Network.mm

+ 6
- 0
modules/juce_core/native/juce_mac_Network.mm View File

@@ -449,6 +449,9 @@ struct BackgroundDownloadTask : public URL::DownloadTask
if (session != nullptr)
downloadTask = [session downloadTaskWithRequest:request];
// Workaround for an Apple bug. See https://github.com/AFNetworking/AFNetworking/issues/2334
[request HTTPBody];
[request release];
}
@@ -1118,6 +1121,9 @@ private:
[req addValue: juceStringToNS (value) forHTTPHeaderField: juceStringToNS (key)];
}
// Workaround for an Apple bug. See https://github.com/AFNetworking/AFNetworking/issues/2334
[req HTTPBody];
connection.reset (new URLConnectionState (req, numRedirectsToFollow));
}
}


Loading…
Cancel
Save