title: IdTcpServer cannot free its context thread after context.connection.disconnect() under CentOS+Lazarus
body: <p>The result of Memo1 is still "ConnCnt:1" after I click btDisconn button, though I wait for several minutes.</p>
  
  <p>But under windows xp it works fine, how can I make idtcpserver remove the invalid context thread?</p>
  
  <p>Here's my code:</p>
  
  <p>Client side (Windows7 + DelphiXE2 + Indy10.5.8):</p>
  
  <pre><code>procedure TForm1.FormShow(Sender: TObject);
  begin
    TcpClient.Host:=192.168.1.103;
    TcpClient.Port:=10000;
    TcpClient.Connect;
  end;
  procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  begin
    try
      TcpClient.Disconnect;
    except
    end;
  end;
  </code></pre>
  
  <p>Server side (Vmware + CentOS + Lararus1.0.12 + Indy10.5.8)</p>
  
  <pre><code>procedure TForm1.FormShow(Sender: TObject);
  var Bind:TIdSocketHandle;
  begin
    TCPServer.Bindings.Clear;
    Bind:=TCPServer.Bindings.Add;
    Bind.IPVersion:=Id_IPv4;
    Bind.Port:=10000;
    TcpServer.OnExecute:=@TcpServerExecute;
    TcpServer.DefaultPort:=10000;
    TcpServer.Active:=true;
    Timer1.Interval:=5000;
    Timer1.Enabled:=true;
  end;
  
  procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
  begin
    Timer1.Enabled:=false;
    TcpServer.Active:=false;
  end;
  
  procedure TForm1.TcpServerExecute(AContext: TIdContext);
  var b:Byte;
  begin
    try
      b:=AContext.Connection.IOHandler.ReadByte();
    except
      on E:Exception do memo1.Lines.Add('Error:'+E.Message)
    end;
  end;
  
  procedure TForm1.Timer1Timer(Sender: TObject);
  var lst:TList;
  begin
    try
      lst:=TcpServer.Contexts.LockList();
      Memo1.Lines.Add('ConnCnt:'+inttostr(lst.Count));//the result is still ConnCnt:1 after i click btDisconn
    finally
      TcpServer.Contexts.UnlockList();
    end;
  end;
  
  procedure TForm1.btDisconnClick(Sender: TObject);
  var i:Integer;lst:TList;itm:TIdContext;
  begin
    try
      lst:=TcpServer.Contexts.LockList();
      for i:=0 to lst.Count-1 do begin
        itm:=TIdContext(lst.Items[i]);
        if Assigned(itm) then begin
          itm.Connection.Disconnect();
          itm.Connection.IOHandler.DiscardAll;
        end;
      end;
    finally
      TcpServer.Contexts.UnlockList();
    end;
  end;
  </code></pre>