From 158d0099cc5e2af4732e401dae07f883dcb2808a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 6 Jan 2011 09:26:08 -0500 Subject: [PATCH] Handle sending the |detach| command when not attached in |-handleInitialResponse:| not |-connectionDidAccept:|. --- Source/DebuggerBackEnd.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/DebuggerBackEnd.m b/Source/DebuggerBackEnd.m index 11cadc2..06f23df 100644 --- a/Source/DebuggerBackEnd.m +++ b/Source/DebuggerBackEnd.m @@ -215,12 +215,6 @@ // Specific Response Handlers ////////////////////////////////////////////////// #pragma mark Response Handlers -- (void)connectionDidAccept:(NetworkConnection*)cx -{ - if (!self.attached) - [connection_ sendCommandWithFormat:@"detach"]; -} - - (void)errorEncountered:(NSString*)error { [delegate errorEncountered:error]; @@ -231,6 +225,11 @@ */ - (void)handleInitialResponse:(NSXMLDocument*)response { + if (!self.attached) { + [connection_ sendCommandWithFormat:@"detach"]; + return; + } + active_ = YES; // Register any breakpoints that exist offline. -- 2.43.5