You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
imap=newImap(imapConfig);varmyExpunge=function(){console.log('HERE');/ ok.
returnnewBluebird(function(resolve,reject){imap.expunge(function(err){console.log('HERE1');// Never meet if the mail box is empty.// My poor promise will never be resolved or rejected. :(if(err){reject(err);}resolve(true);});})}
Such a behavior kills a normal flow of any async actions.
The text was updated successfully, but these errors were encountered:
And had such a debug log (no any mention of expunge in the log):
...
=> 'A6 LOGOUT'
BEFORE EXPUNGE CALL
<= '* BYE IMAP4rev1 Server logging out'
<= 'A6 OK LOGOUT completed'
[connection] Ended
[connection] Closed
When I removed imap.end() before imap.expunge() - the callback started to invoke.
But, I think it is useful to invoke the callback with an error (or throw some exception) in similar case (invalid object state), and not just ignore such a call.
Without this it would be too hard to debug anything in async code.
Dzenly
changed the title
expunge function does not call its callback if there is no mails in the box.
expunge function does not call its callback if it is called after the end() call.
Sep 22, 2016
Tested with imap.yandex.ru mail.
Such a behavior kills a normal flow of any async actions.
The text was updated successfully, but these errors were encountered: