diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index afde564fe6..77ee0f6afe 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -145,7 +145,8 @@ public: while (isThreadRunning() && ! initialised) { if (callback != nullptr) - callback (context, (int) latestTotalBytes, (int) [[request HTTPBody] length]); + if (! callback (context, (int) latestTotalBytes, (int) [[request HTTPBody] length])) + return false; Thread::sleep (1); } @@ -398,7 +399,8 @@ public: while (isThreadRunning() && ! initialised) { if (callback != nullptr) - callback (context, latestTotalBytes, (int) [[request HTTPBody] length]); + if (! callback (context, latestTotalBytes, (int) [[request HTTPBody] length])) + return false; Thread::sleep (1); }