aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPProcessListController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-27 09:26:13 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-27 09:26:13 +0000
commitf22d42877a8ea4ea5c67fc8a95a62cd00d2d74e2 (patch)
tree71e66ddc37d1b23e685ea8fe6161e12f9e683d49 /Source/SPProcessListController.m
parent5af57456d3669d048c16831bd3a5afdb7ca9b2e2 (diff)
downloadsequelpro-f22d42877a8ea4ea5c67fc8a95a62cd00d2d74e2.tar.gz
sequelpro-f22d42877a8ea4ea5c67fc8a95a62cd00d2d74e2.tar.bz2
sequelpro-f22d42877a8ea4ea5c67fc8a95a62cd00d2d74e2.zip
Add extra connection checking at multiple stages of getting the server's process list. Fixes http://spbug.com/l/152.
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r--Source/SPProcessListController.m25
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index 92744276..07c67247 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -623,17 +623,20 @@
NSUInteger i = 0;
// Get processes
- MCPResult *processList = [connection listProcesses];
-
- [processList setReturnDataAsStrings:YES];
-
- if ([processList numOfRows]) [processList dataSeek:0];
-
- [processes removeAllObjects];
-
- for (i = 0; i < [processList numOfRows]; i++)
- {
- [processes addObject:[processList fetchRowAsDictionary]];
+ if ([connection isConnected]) {
+
+ MCPResult *processList = [connection listProcesses];
+
+ [processList setReturnDataAsStrings:YES];
+
+ if ([processList numOfRows]) [processList dataSeek:0];
+
+ [processes removeAllObjects];
+
+ for (i = 0; i < [processList numOfRows]; i++)
+ {
+ [processes addObject:[processList fetchRowAsDictionary]];
+ }
}
// Update the UI on the main thread