Skip to content

Commit 205c471

Browse files
committed
Fix db status on pgsqlblocks backend termination and password entry cancellation
1 parent c4136c1 commit 205c471

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/ru/taximaxim/pgsqlblocks/modules/db/controller/DBController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public synchronized void connectAsync() {
116116
} catch (UserCancelException e) {
117117
LOG.info(String.format(resourceBundle.getString("user_cancelled_on_connection"), model.getName()));
118118
stopProcessesUpdater();
119+
setStatus(DBStatus.DISABLED);
119120
} catch (SQLException e) {
120121
setStatus(DBStatus.CONNECTION_ERROR);
121122
listeners.forEach(listener -> listener.dbControllerConnectionFailed(this, e));
@@ -248,6 +249,7 @@ public void stopProcessesUpdater() {
248249

249250
public void updateProcesses() {
250251
if (!isConnected()) {
252+
setStatus(DBStatus.CONNECTION_ERROR);
251253
connectAsync();
252254
} else {
253255
executor.execute(this::loadProcesses);

0 commit comments

Comments
 (0)