From 7c56b11d8bdead768e86643a4b61e3f293820330 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 9 Mar 2017 03:39:29 +0100 Subject: * 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) --- Source/SPDatabaseStructure.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source') 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; -- cgit v1.2.3