Handle sending the |detach| command when not attached in |-handleInitialResponse...
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 6 Jan 2011 14:26:08 +0000 (09:26 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 6 Jan 2011 14:26:08 +0000 (09:26 -0500)
Source/DebuggerBackEnd.m

index 11cadc2615b667b4027f7c631927abad699eb313..06f23df0caeb10aea62642d52d1a1e35a3b6cbe6 100644 (file)
 // Specific Response Handlers //////////////////////////////////////////////////
 #pragma mark Response Handlers
 
-- (void)connectionDidAccept:(NetworkConnection*)cx
-{
-  if (!self.attached)
-    [connection_ sendCommandWithFormat:@"detach"];
-}
-
 - (void)errorEncountered:(NSString*)error
 {
   [delegate errorEncountered:error];
  */
 - (void)handleInitialResponse:(NSXMLDocument*)response
 {
+  if (!self.attached) {
+    [connection_ sendCommandWithFormat:@"detach"];
+    return;
+  }
+
   active_ = YES;
 
   // Register any breakpoints that exist offline.