(Relay) Minor optimization to TRelayer.OpenConnection
authorMegaBrutal <code+git@megabrutal.com>
Wed, 21 Nov 2018 15:14:56 +0000 (16:14 +0100)
committerMegaBrutal <code+git@megabrutal.com>
Wed, 21 Nov 2018 15:14:56 +0000 (16:14 +0100)
modified:   Relay.pas

Relay.pas

index 3df2b330ca14ec3d79d61d5200980f7f74597ded..bcbcc9d92ee6842c5de66b050df69c6890e949e1 100644 (file)
--- a/Relay.pas
+++ b/Relay.pas
@@ -333,9 +333,8 @@ begin
    if MXList.Count >= 1 then begin
       TCP:= TTCPRFCConnection.Create;
       TCP.SetBindAddress(MainServerConfig.BindAddress);
-      TCP.Connect(MXList.Strings[0], RelayServerPort);
       TCP.SetSockTimeOut(DEF_SOCK_TIMEOUT);
-      i:= 1;
+      i:= 0;
       while (not TCP.Connected) and (i < MXList.Count) do begin
          TCP.Connect(MXList.Strings[i], RelayServerPort);
          Inc(i);