Open NamTThai opened 8 years ago
end
will get emitted no matter what, so that is most likely what you're seeing.
Is there any alternatives to end
that will emit after message
but not when error
occurs? Like jQuery ajax success
event
Not currently, no.
Here is a snippet of me using
node-imap
Occasionally when error occurs, I get multiple callback problem: the function
callback
is supposed to be called only once. My expectation is that when an error occurs,callback
triggers andimap
just stop doing everything else. But apparently, some later events still trigger, and mycallback
function gets called again.Which one is it?
Is it the ImapFetch#end event? Does it get called even after an
error
occur?