[imapfilter-devel] enter_idle errors out of pcall
Lefteris Chatzimparmpas
lefcha at hellug.gr
Wed Jun 23 21:28:14 EEST 2010
Hello,
Currently imapfilter does not try to recover from network problems and
IMAP sessions that have been terminated abruptly.
The pcall() function cannot work in this situation where the connection
is closed in the C part of imapfilter (Lua is just used as an interface
for the C backend).
I don't think you can do much unless you dive into the code, but I will
have a look on how I can improve this situation for the next release...
L.
On 06/23/2010 07:59 AM, Paul wrote:
>
> Hello all,
>
> The main part of my script is this:
>
> print "Idle..."
> update = pcall(frommailbox:enter_idle())
>
> Once idle exits, it loops around and processes whatever arrived in the
> mailbox.
>
> However, once in a while I get this:
>
> imapfilter: reading data; EOF in violation of the protocol
>
> I get this when the idle session is broken for whatever reason -
> internet connection fails for example. But the purpose of the pcall was
> to handle this, so if enter_idle fails for any reason, I don't care, and
> am happy to loop around and get back the idle.
>
> But no, the script exits anyway. Is there someway I can keep this going
> - have I done the pcall wrong - or do I need to wrap the actual call to
> imapfilter in a loop?
>
> Thanks,
>
> Paul
>
> _______________________________________________
> Imapfilter-devel mailing list
> Imapfilter-devel at lists.hellug.gr
> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel
More information about the Imapfilter-devel
mailing list