On Jun 4, 2009, at 2:11 PM, Ammar Ibrahim wrote:
Hello, I'm about to bang my head against the wall. Here's the
situation, I'm
trying to send many requests using the same request object, I have a
method
which I call frequently, which has the following piece of code:
This is not all the relevant code, and is insufficient to help. All I
can say is, are you re-using the same NSURLConnection, just changing
the request? If so, that wouldn't work. NSURLConnection copies the
request on initialization.
NSMutableURLRequest *newReq = [[NSMutableURLRequest alloc] init];
[newReq setHTTPMethod:@"GET"];
[newReq setURL:[NSURL URLWithString:[@"/media"
stringByAppendingPathComponent:[currentTrack
objectForKey:@"Persistent ID"]]
relativeToURL:[self serverBaseUrl]]];
NSURLConnection *connection = [NSURLConnection
connectionWithRequest:newReq
delegate:self];
if (connection == nil) {
//connection couldn't be created!
NSLog(@"Connection couldn't be created: %@", [newReq URL]);
[self startSyncAfterTimeInterval];
}
The first request works, after that it seems to not even send the
request,
although the server is still responsive! I get the following error:
*Connection failed with error: Error Domain=NSURLErrorDomain
Code=-1001
UserInfo=0x1397a40 "timed out"*
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40esoteritech.com
This email sent to cocoa-...@esoteritech.com
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com