• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSMutableURLRequest weirdness!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMutableURLRequest weirdness!


  • Subject: NSMutableURLRequest weirdness!
  • From: Ammar Ibrahim <email@hidden>
  • Date: Thu, 4 Jun 2009 23:11:14 +0300

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:


 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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSMutableURLRequest weirdness!
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: including cocoa in cpp file
  • Next by Date: Re: including cocoa in cpp file
  • Previous by thread: Re: including cocoa in cpp file
  • Next by thread: Re: NSMutableURLRequest weirdness!
  • Index(es):
    • Date
    • Thread