aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-11-11 00:14:50 +0000
committerstuconnolly <stuart02@gmail.com>2009-11-11 00:14:50 +0000
commitf7f1c7bd05538feca61f735f6039e548f9d7ad5e (patch)
tree09bda39946d215114b161e45b5f23b2cdcaf4fc1 /Source/TableDocument.m
parent938e8654b76383396ee187ab751bb8fa6d67f37a (diff)
downloadsequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.tar.gz
sequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.tar.bz2
sequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.zip
During an import, before entering the loop to execute the current batch of queries, check that the current connection is active and if not bail from the method.
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index a4f078a3..e8187334 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -3575,11 +3575,10 @@
[NSApp endSheet:connectionErrorDialog];
[connectionErrorDialog orderOut:nil];
- // If "disconnect" was selected, trigger a window close.
- if (connectionErrorCode == 2) {
+ // If 'disconnect' was selected, trigger a window close.
+ if (connectionErrorCode == MCPConnectionCheckDisconnect) {
[self windowWillClose:nil];
- if (connectionErrorCode == MCPConnectionCheckDisconnect)
- [tableWindow performSelector:@selector(close) withObject:nil afterDelay:0.0];
+ [tableWindow performSelector:@selector(close) withObject:nil afterDelay:0.0];
}
return connectionErrorCode;