DZ-Jay wrote:
> Can you post some code so that we know how you tried to fix it?

The bug I found is the "Special processing for Quit" below.

procedure TCustomPop3Cli.TriggerRequestDone(Error: Word);
==> (*  
    { Special processing for Quit (Roger Morton 24-12-99) }
    if FRequestType = pop3Quit then begin
        if FWaitingOnQuit then
            { When the second RqDone arrives (from WSocketSessionClosed),   }
            { treat it as a normal event by setting a zero Error code       }
            Error := 0
        else begin
            { When the first RqDone arrives, set the FWaitingOnQuit flag so }
            { we're ready to handle a second RqDone.                        }
            { Take no other action (in particular, we don't advise the user }
            { that the first RqDone has happened)                           }
            FWaitingOnQuit := True;
        { Fall down here for all normal RqDone, and after the second RqDone }
        { following a Quit                                                  }
        FWaitingOnQuit := False;
==> *)

This code prevents that RequestDone fires in case the server doesn't
send a response to the Quit command, and thus the Pop3State is never reset

Arno Garrels [TeamICS]

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to