aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
index fd7d181b..bf8a2599 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
@@ -193,9 +193,6 @@
// Update the connection's error statuses in case of error during content download
[parentConnection updateErrorStatuses];
- // Unlock the connection and return
- [parentConnection unlockConnection];
- connectionUnlocked = YES;
return nil;
}
@@ -461,6 +458,10 @@
pthread_mutex_unlock(&dataFreeLock);
}
+ // Unlock the parent connection now data has been retrieved
+ connectionUnlocked = YES;
+ [parentConnection unlockConnection];
+
dataDownloaded = YES;
[downloadPool drain];
}