Skip to content

Commit

Permalink
Fix db status on pgsqlblocks backend termination and password entry c…
Browse files Browse the repository at this point in the history
…ancellation
  • Loading branch information
antoon-r committed Oct 21, 2018
1 parent c4136c1 commit 205c471
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public synchronized void connectAsync() {
} catch (UserCancelException e) {
LOG.info(String.format(resourceBundle.getString("user_cancelled_on_connection"), model.getName()));
stopProcessesUpdater();
setStatus(DBStatus.DISABLED);
} catch (SQLException e) {
setStatus(DBStatus.CONNECTION_ERROR);
listeners.forEach(listener -> listener.dbControllerConnectionFailed(this, e));
Expand Down Expand Up @@ -248,6 +249,7 @@ public void stopProcessesUpdater() {

public void updateProcesses() {
if (!isConnected()) {
setStatus(DBStatus.CONNECTION_ERROR);
connectAsync();
} else {
executor.execute(this::loadProcesses);
Expand Down

0 comments on commit 205c471

Please sign in to comment.