Hi, been experiencing something kinda odd, not sure if this is on purpose
or a bug somewhere:

After RequestDone with THttpCli, if there is an -unhandled- exception
before the code is out of ReqDone stack, RequestDone is triggered again.
Try the following code:

  httpcli1.RcvdStream := tmemorystream.Create;
>   httpcli1.URL := 'google.com';
>   httpcli1.Get;
> procedure TForm1.HttpCli1RequestDone(Sender: TObject; RqType:
> THttpRequest; ErrCode: Word);
> var ts: tstringlist;
> begin
>   if rqtype <> httpGET then exit;
>   memo1.Lines.Add('req done');
>   ts := tstringlist.Create;
>   ts.Add('sdfdsf'); // 0
>   caption := ts[1]; // list out of bounds, 0..1..2
> end;

You will see RequestDone is triggered twice, and external exception
handlers or delphi's don't trigger at all (e.g madExcept).
I know I can solve this by using try/except on the final code, or using
BgException (canclose := False), but why is this happening?
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to