From 641a0ea3349fe9fb0b49a5dc49d5a141bdcaa3e2 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 11 Jun 2025 15:16:08 +0200 Subject: [PATCH] Issue #2172: prompt for password again, when connection has timeout or broke --- source/dbconnection.pas | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index a2802ea7..dff10c6e 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -445,7 +445,6 @@ type FServerDateTimeOnStartup: String; FParameters: TConnectionParameters; FSecureShellCmd: TSecureShellCmd; - FLoginPromptDone: Boolean; FDatabase: String; FAllDatabases: TStringList; FLogPrefix: String; @@ -2000,7 +1999,6 @@ begin FKeyCache := TKeyCache.Create; FForeignKeyCache := TForeignKeyCache.Create; FCheckConstraintCache := TCheckConstraintCache.Create; - FLoginPromptDone := False; FCurrentUserHostCombination := ''; FKeepAliveTimer := TTimer.Create(Self); FFavorites := TStringList.Create; @@ -3111,8 +3109,8 @@ var UsingPass: String; Dialog: TfrmLogin; begin - // Prompt for password on initial connect - if FParameters.LoginPrompt and (not FLoginPromptDone) then begin + // Don't remember prompt values + if FParameters.LoginPrompt then begin Dialog := TfrmLogin.Create(Self); Dialog.Caption := APPNAME + ' - ' + FParameters.SessionName; Dialog.lblPrompt.Caption := f_('Login to %s:', [FParameters.Hostname]); @@ -3122,7 +3120,6 @@ begin FParameters.Username := Dialog.editUsername.Text; FParameters.Password := Dialog.editPassword.Text; Dialog.Free; - FLoginPromptDone := True; end; // Prepare connection