Re: Bug? TIdPop3 gets unstable if error in attachement-decoding occurs

Giganews Newsgroups
Subject: Re: Bug? TIdPop3 gets unstable if error in attachement-decoding occurs
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Wed, 8 Jun 2005

"Thomas" <Thom…@gmx.de> wrote in message
news:664B1B14E3CDE240Thom…@gmx.de...

> After this error i cant receive any further emails.

Makes sense.  A similar issue was recently reported in the following
discussion:

    Newsgroup: borland.public.delphi.internet.winsock
    Subject: eidreplypop3error

> If ProcessAttachment raises an error, the buffer with the email-data
> is not cleared and all following actions will fail.

That is the same issue in the other discussion.

> I changed this lines:
<snip>
> to:
<snip>
> This works for all my emails.

I disagree with your "solution".  Clearing the InputBuffer, especially at
that point in the code, does not guarantee that the socket will return to a
stable condition.  If the server is sending data slowly, additional message
data may arrive after the InputBuffer is cleared.  The only reliable way to
address the issue, asside from fixing the exception of course, is to ensure
that all data is read from the socket in full before decoding it.  That way,
any decoding errors won't interfer with socket operations.

Gambit

Replies

In response to

Bug? TIdPop3 gets unstable if error in attachement-decoding occurs posted by Thomas on Wed, 8 Jun 2005