procedure TForm1.stopClick(Sender: TObject);
var
  Count: Integer;
  List: TList;
begin
  List := IdTCPServer1.Threads.LockList;
  if list.count <> 0 then
  begin
    for count := 0 To list.Count-1 do
    begin
      try
      TIdPeerThread(List.Items[Count]).Stop;
      TIdPeerThread(List.Items[Count]).Destroy;
      LbLog.Lines.Add('服务器断开' +
      TIdPeerThread(List.Items[Count]).Connection.Socket.Binding.PeerIP
         + '的连接');
      except
      end;
    end;
  end;   
  try
    IdTCPServer1.Active := False;
    LbLog.Lines.Add('服务器已成功停止!');
    run.Enabled := True;
    run.visible := True;
    stop.Enabled := False;
    stop.Visible := False;
  except
    LbLog.Lines.Add('服务器不能停止!');
  end;end;
为什么 List := IdTCPServer1.Threads.LockList; 执行后根死机差不多?procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);begin
  LbLog.Lines.Add('来自主机 '
  + AThread.Connection.Socket.Binding.PeerIP
  + ' 的连接请求已被接纳!');  Edit3.Text := IntTOStr(IdTCPServer1.Threads.LockList.Count);end;  Edit3.Text := IntTOStr(IdTCPServer1.Threads.LockList.Count);这句不添加没关系,添加后,客户端断开后,不能连接。这有点怪异,有遇到这种情况的大侠吗?
谢谢先!