aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-18 15:31:30 +0000
committerrowanbeentje <rowan@beent.je>2010-03-18 15:31:30 +0000
commita6ffcaa5e07bb286b06f761d902e44b7fefaaaed (patch)
tree02521369c8d4aade39dfa5eb2859a1b0afb629fd /Frameworks/MCPKit
parente2d9581fdcd4773cf23c0482beb3b5c6178b90bf (diff)
downloadsequelpro-a6ffcaa5e07bb286b06f761d902e44b7fefaaaed.tar.gz
sequelpro-a6ffcaa5e07bb286b06f761d902e44b7fefaaaed.tar.bz2
sequelpro-a6ffcaa5e07bb286b06f761d902e44b7fefaaaed.zip
- Move streaming query result connection unlocking to the download thread rather than the data processing thread. This ensures the connection unlock is walys called - even when no data is present - thus addressing Issue #594. (Prior to r1931 manual memory management caught this case anyway)
Diffstat (limited to 'Frameworks/MCPKit')
-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];
}