title: How to set ConnectTimeout/ReadTimeout in Indy SSL
body: <p>How i can set ConnectTimeout/ReadTimeout in Indy when using SSL ?</p>
  
  <p>MCVE:</p>
  
  <pre><code>program mcve;
  
  uses
    {$IFDEF UNIX}{$IFDEF UseCThreads}
    cthreads,
    {$ENDIF}{$ENDIF}SysUtils, IdHTTP, IdSSLOpenSSL, DateUtils;
  
  var
    HTTP    : TIdHTTP;
    SSL     : TIdSSLIOHandlerSocketOpenSSL;
    Started : TDateTime;
  begin
    HTTP := TIdHTTP.Create();
    try
      HTTP.ReadTimeout            := 1000;
      HTTP.ConnectTimeout         := 2000;
      SSL                         := TIdSSLIOHandlerSocketOpenSSL.Create(HTTP);
      SSL.ConnectTimeout          := HTTP.ConnectTimeout;
      SSL.ReadTimeout             := HTTP.ReadTimeout;
      SSL.SSLOptions.SSLVersions  := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];
      HTTP.IOHandler              := SSL;
      Started := Now;
      try
        HTTP.Get(ParamStr(1));
      except
        On E: Exception do WriteLn(E.Message);
      end;
      Writeln(FormatDateTime('hh:nn:ss', SecondsBetween(Started, Now) / SecsPerDay));
    finally
      HTTP.Free;
    end;
  end.
  </code></pre>
  
  <p>When using <code>http</code> ConnectTimeout/ReadTimeout work fine the issue only when using <code>https</code> see below:</p>
  
  <pre><code>:~$ ./mcve http://x.x.x.x
  Read timed out.
  00:00:01 &lt;-- Correct.
  </code></pre>
  
  <hr>
  
  <pre><code>:~$ ./mcve https://x.x.x.x
  Socket Error # 0
  
  00:03:38 &lt;-- NOT Correct / More than SSL.ReadTimeout value.
  </code></pre>
  
  <p>Lazarus 2.0.6 Indy installed from OPM version 10.6.2.5494.</p>
  
  <p>Note: On Windows same code using Delphi with shipped Indy 10.6.2.5366, The results works as expected</p>