-(void)manageNetConnection{
static BOOL closing=FALSE;
NSLog(@"connecting Imap after net");
if([imapStoreObj isStoreConnected] && closing==FALSE){
[imapStoreObj close];
NSLog(@"close store");
closing=TRUE;
[self performSelector:@selector(manageNetConnection) withObject:nil afterDelay:5.0];
return;
}else if ([imapStoreObj isStoreConnected] && closing==TRUE) {
[self performSelector:@selector(manageNetConnection) withObject:nil afterDelay:5.0];
return;
}
closing=FALSE;
[indicatorForGetMail setHidden:NO];
[indicatorForGetMail startAnimation:nil];
netOff=2;
NSLog(@"netOff==%d",netOff);
[editFolderTable setAllowsMultipleSelection:NO];
NSLog(@"connect net");
[self reconnect];
}
在重新建立连接之前,预计此函数会调用自身。问题是该函数在指定的延迟后不会调用自己。请帮忙