Closed abbood closed 11 years ago
You can tweak maximum connections when creating MCOImapSession, here is a code snippet
MCOIMAPSession *imapSession = [[MCOIMAPSession alloc] init];
.....
imapSession.maximumConnections = 2;
Default is 3, but I keep a low value 2, as too many connections sometimes disappoint google servers and IMAP operations start failing.
@abhinavguptas i guess we are talking about two different things.. I'm assuming the imapSession maximumConnections refer to the actual simultaneous networking connections with the Imap server.. I'm referring here to the MailCore level, which ultimately uses the the several imap connection property but behinds the scenes..
All operations should be executed. Do you perform every calls from the main thread?
not necessarily.. are you saying that all the calls must be made from the main thread? how come?
mailcore2 will make them asynchronous for you.
even if i make them from the main thread.. there are still some operations that never execute their callback.. is there a way to debug this? suppose i have a reference to the MCOIMAPMessageRenderingOperation
object that never completed.. what can i do to tell if there is something wrong? put a timeout and fire again?
@dinhviethoa I've been doing some debugging.. I created a table that lists the results of me sending requests and weather i got a response back or not.. see it here
here are some quick conclusions:
i'm still trying to figure this out.
I think i figured it out.. basically the reason why things were acting all weird was because i had issued the idle
command and didn't interrupt it before making the call!!
@dinhviethoa i did this with the old mailcore and it seemed to help me a lot.. so consider this scenario
idle
commandand so on.. does this make sense?
Sure, you should interrupt idle whenever you want to issue a command.
Call -[MCOIMAPIdleOperation interruptIdle]
Could you solve your issue?
I'm closing this issue. Feel free to re-open if you could not solve your issue.
yeah i'm good thanks! :)
Two things led me to ask this question:
MCOIMAPMessageRenderingOperation
requests in a for loop (ie they were all dispatched almost simultaneously), but then not all of the callbacks would execute (ie for each request).. the thing is i wouldn't even get errors.. it's as if the request was never made (out of 20 requests the max complete callbacks were executed was around 16)MCOIMAPMessageRenderingOperation
requests at the same time.. anything more than that would be cancelled..So what is the recommended max concurrent requests we should make.. and is this a bug or expected behavior that some callbacks are never executed?