mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-29 11:36:44 +08:00
Fixed bug #1849 : Connection reloading doesn't work
This commit is contained in:
@@ -24,12 +24,12 @@ RedisClient::Connection::~Connection()
|
||||
|
||||
bool RedisClient::Connection::connect() // todo: add block/unblock parameter
|
||||
{
|
||||
if (m_isTransporterInitialized)
|
||||
return false;
|
||||
|
||||
if (isConnected())
|
||||
return true;
|
||||
|
||||
if (m_isTransporterInitialized)
|
||||
return false;
|
||||
|
||||
//todo : implement unix socket transporter
|
||||
if (config.useSshTunnel()) {
|
||||
transporter = QSharedPointer<AbstractTransporter>(new SshTransporter(this));
|
||||
|
||||
@@ -88,22 +88,26 @@ RedisClient::Connection * RedisServerItem::getConnection()
|
||||
}
|
||||
|
||||
void RedisServerItem::reload()
|
||||
{
|
||||
blockSignals(true);
|
||||
unload();
|
||||
blockSignals(false);
|
||||
|
||||
{
|
||||
unload();
|
||||
loadDatabaseList();
|
||||
}
|
||||
|
||||
void RedisServerItem::unload()
|
||||
{
|
||||
if (!isDbInfoLoaded)
|
||||
return;
|
||||
|
||||
setBusyIcon();
|
||||
|
||||
blockSignals(true);
|
||||
removeRows(0, rowCount());
|
||||
blockSignals(false);
|
||||
|
||||
isDbInfoLoaded = false;
|
||||
|
||||
connection->disconnect();
|
||||
|
||||
getItemNameFromConnection();
|
||||
|
||||
setOfflineIcon();
|
||||
|
||||
Reference in New Issue
Block a user