fix: DB list for different connection

This commit is contained in:
Jan Prochazka
2024-06-03 10:14:17 +02:00
parent 5c703c786d
commit d454da325f
3 changed files with 21 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import _ from 'lodash';
import { openedConnections, currentDatabase } from '../stores';
import { openedConnections, currentDatabase, openedConnectionsWithTemporary } from '../stores';
import { apiCall, strmid } from './api';
import { getConnectionList } from './metadataLoaders';
@@ -26,7 +26,7 @@ let openedConnectionsHandle = null;
let currentDatabaseHandle = null;
export function subscribeConnectionPingers() {
openedConnections.subscribe(value => {
openedConnectionsWithTemporary.subscribe(value => {
doServerPing(value);
if (openedConnectionsHandle) window.clearInterval(openedConnectionsHandle);
openedConnectionsHandle = window.setInterval(() => doServerPing(value), 20 * 1000);