aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-03-09 03:39:29 +0100
committerMax <post@wickenrode.com>2017-03-09 03:39:29 +0100
commit7c56b11d8bdead768e86643a4b61e3f293820330 (patch)
tree413e33bb2f9ab97d5e71532585447a7fb928d836 /Source
parent6c3ab14a0cb89e64256c1d3e7db57adb3d45057c (diff)
downloadsequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.tar.gz
sequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.tar.bz2
sequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.zip
* Turn `-[SPMySQLConnection checkConnectionIfNecessary]` into a public method, since it is actually the preferable way to `-[SPMySQLConnection checkConnection]` (which forces network IO in a new thread each time)
* Change `-[SPDatabaseStructure queryDbStructureWithUserInfo:]` doing a forced connection check inside a tight loop (#2306)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseStructure.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m
index 8eed2607..fdb78916 100644
--- a/Source/SPDatabaseStructure.m
+++ b/Source/SPDatabaseStructure.m
@@ -551,7 +551,7 @@ cleanup_thread_and_pool:
if (!mySQLConnection || !delegate) return NO;
// Check the connection state
- if ([mySQLConnection isConnected] && [mySQLConnection checkConnection]) return YES;
+ if ([mySQLConnection isConnected] && [mySQLConnection checkConnectionIfNecessary]) return YES;
// the result of checkConnection may be meaningless if the thread was cancelled during execution. (issue #2353)
if([[NSThread currentThread] isCancelled]) return NO;