Skip to content
Permalink
Browse files

Issue #521: increase waiting time after PLink output, from 1s to 2s, …

…for slow connections.
  • Loading branch information...
ansgarbecker committed Apr 16, 2019
1 parent 9ea65d4 commit f870c81770bdffef02d07965fc4cdc6c8481352d
Showing with 5 additions and 5 deletions.
  1. +5 −5 source/dbconnection.pas
@@ -928,10 +928,10 @@ procedure TPlink.Connect;

OutText := Trim(ReadPipe(FOutPipe));
ErrorText := ReadPipe(FErrorPipe);
if (OutText <> '') or (ErrorText <> '') then
if (OutText <> '') or (ErrorText <> '') then begin
ReturnedSomethingAt := Waited;

FConnection.Log(lcDebug, 'plink OutText:'+OutText+' ErrorText:'+ErrorText);
FConnection.Log(lcDebug, 'PLink OutText: "'+OutText+'" ErrorText: "'+ErrorText+'"');
end;

if OutText <> '' then begin
if ExecRegExpr('login as\s*\:', OutText) then begin
@@ -975,8 +975,8 @@ procedure TPlink.Connect;
end;
end;

// Exit loop after 1s idletime when there was output earlier
if (ReturnedSomethingAt > 0) and (Waited >= ReturnedSomethingAt+1000) then
// Exit loop after 2s idletime when there was output earlier
if (ReturnedSomethingAt > 0) and (Waited >= ReturnedSomethingAt+2000) then
Break;

Application.ProcessMessages;

0 comments on commit f870c81

Please sign in to comment.
You can’t perform that action at this time.