I am using Delphi 10.1 Berlin update and Indy's TIdHttp component. I usually abort a connection using the following code:
procedure TMyThread.OnWork(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: int64);
begin
if abort then (asender as tidhttp).Disconnect;
end;
This works fine in a VCL application, also in a FireMonkey application as long the platform is Windows. When I use this code with MacOS as target, it close my application instantly without error message or anything displayed.
So my question here is what am I doing wrong, and how can I abort a connection when the platform is MacOS?