Fixed an issue where connections keep open to (closed) connections on the initial connection to the database server. Fixes #7035

This commit is contained in:
Nikhil Mohite
2022-01-19 15:02:05 +05:30
committed by Akshay Joshi
parent dabe64a8df
commit d945c6f843
3 changed files with 3 additions and 1 deletions

View File

@@ -239,6 +239,7 @@ define('pgadmin.node.database', [
data.icon = 'icon-database-not-connected';
t.addIcon(i, {icon: data.icon});
t.unload(i);
pgBrowser.Events.trigger('pgadmin:browser:tree:update-tree-state', i);
setTimeout(function() {
t.select(prv_i);
}, 10);

View File

@@ -260,7 +260,7 @@ _.extend(pgBrowser.browserTreeState, {
},
expand_from_previous_state: function(item) {
let self = this,
treeData = self.stored_state || {},
treeData = this.current_state || {},
data = item && pgBrowser.tree.itemData(item),
treeHierarchy = pgBrowser.tree.getTreeNodeHierarchy(item);