Don't release the NSURLConnection object when an error has occured,
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 3 Feb 2009 00:36:29 +0000 (19:36 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 3 Feb 2009 15:14:35 +0000 (10:14 -0500)
it's already released upstream.

iPhoto2Ansel/TURXMLConnection.m

index 5de6227..58a73db 100644 (file)
@@ -79,12 +79,15 @@ didReceiveResponse: (XMLRPCResponse *)theResponse
                                        userInfo: userInfo];
         hasError = YES;
         [theResponse release];
-        [xconnection cancel];
     }
     
     response = [[theResponse responseObject] retain];
     [theResponse release];
-    [xconnection release];
+    if (!hasError) {
+        // Looks like the NSURLConnection object is released somewhere upstream
+        // when there is an error.
+        [xconnection release];
+    }
     running = NO;
 }