title: Tclientsocket if socket can't connect
body: <p>I want that my sockets connects to an backuphost when the socket can't connect to the host, i tried this:</p>
  
  <pre><code>if prclient.Socket.connected = false then
  begin
  prclient.Active := false;
  prclient.Port := PORT;
  prclient.Host := HOST;
  prclient.Active := true;
  prclient.Open;
  sleep(500);
  if prclient.Socket.Connected = false then
  begin
  prclient.Active := false;
  prclient.Host := BACKUPHOST;
  prclient.Active := true;
  prclient.Open;
  end;
  end;
  </code></pre>
  
  <p>But now he doesn't connect at all.
  Who knows a working script?</p>