I turn off my network and run my ios program.
then stay stopping program.

after when I turn on my network. My program still stop.

I want to reconnect NSURLConnection in ios.

```
-(void) applistDBdownload
{
NSString *file = [NSString stringWithFormat:@"http://sok129.cafxxx.com/oneapplist.sqlite3"];
NSURL *fileURL = [NSURL URLWithString:file];

NSURLRequest *req = [NSURLRequest requestWithURL:fileURL];
connect= [NSURLConnection connectionWithRequest:req delegate:self];

fileData = [[NSMutableData alloc] initWithLength:0];
}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
NSLog(@"fail");    -> come in when network off.
                   -> no come in when network on

}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
          -> no come in when network on
          -> come in when network off 
}

```

1.How do I reconnect? 

and

```
  - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
if(self.connect!=connection)
{
    NSLog(@"noconnect");
    return;
}

 [self.fileData appendData:data]; 
}

```

1. in this code area,if network turn off, how do i handling in this code?