title: NSURLConnection always failing after restarting app
body: <p>I realize this is a vague question, but I'm wondering if anyone else has observed this. Here is my code for calling the NSURLConnection</p>
  
  <pre><code>   // Get data from server
      NSString *host = @"www.hostname.com";            
      NSString *urlString = [NSString stringWithFormat:@"/theRestOfTheURL"];
      NSURL *url = [[NSURL alloc] initWithScheme:@"http" host:host path:urlString];
  
      DLog(@"URL is %@", url);
  
      // Create the NSMutableData to hold the received data.
      // receivedData is an instance variable declared elsewhere.
      receivedData_ = [[NSMutableData data] retain];
  
      NSURLRequest *theRequest=[NSURLRequest requestWithURL:url
                                                cachePolicy:NSURLRequestUseProtocolCachePolicy
                                            timeoutInterval:15.0];
  
      // create the connection with the request
      // and start loading the data
      self.powerPlantDataConnection = [[[NSURLConnection alloc] initWithRequest:theRequest delegate:self] autorelease];
  
      [url release]; 
  </code></pre>
  
  <p>When I first load the app it works fine, and I can call it repeatedly without any problem. But if I close the app and reopen it, the </p>
  
  <pre><code>(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
  </code></pre>
  
  <p>delegate method gets called every time, with a request timed out error message. I have two different view controllers where I am making calls to two different URLS, and both of them fail every time after closing and reopening the app.</p>
  
  <p>Can anyone think of any reason why this might be happening? I'm not sure where to start looking. What could be the cause of a request timed out error? There should be nothing wrong with the request since it works when I first run the app.</p>
  
  <hr>
  
  <p>Edited to add that it seems I only have this problem on my device, not on the simulator.</p>