Browse Source

Pull request #15205: REPORT-138804 【fr-fbp冒烟】用户切换工作目录,锁未释放

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/master to fbp/master

* commit '7e91e9cc5b2a0c04918d76e9047cfd84a216dc33':
  REPORT-138804 【fr-fbp冒烟】用户切换工作目录,锁未释放
fbp/master
Destiny.Lin-林锦龙 1 month ago
parent
commit
39b85813fc
  1. 3
      designer-base/src/main/java/com/fr/design/backup/EnvBackupHelper.java

3
designer-base/src/main/java/com/fr/design/backup/EnvBackupHelper.java

@ -5,6 +5,7 @@ import com.fanruan.config.realm.ConfigRepositoryFactory;
import com.fanruan.config.realm.local.LocalConfigRepositoryBuilder; import com.fanruan.config.realm.local.LocalConfigRepositoryBuilder;
import com.fr.design.ConfigHelper; import com.fr.design.ConfigHelper;
import com.fr.design.env.RemoteWorkspace; import com.fr.design.env.RemoteWorkspace;
import com.fr.design.lock.TemplateLockInfoReSave;
import com.fr.design.mem.MemConfigBackupManager; import com.fr.design.mem.MemConfigBackupManager;
import com.fr.design.mem.MemConfigRepositoryBuilder; import com.fr.design.mem.MemConfigRepositoryBuilder;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -123,6 +124,7 @@ public class EnvBackupHelper {
// 如果原来是远程,要先发请求告诉原来的环境我这边要断开 // 如果原来是远程,要先发请求告诉原来的环境我这边要断开
if (origin instanceof RemoteWorkspace) { if (origin instanceof RemoteWorkspace) {
origin.close(); origin.close();
TemplateLockInfoReSave.stopListener();
} }
} }
@ -131,6 +133,7 @@ public class EnvBackupHelper {
*/ */
public void rollbackEnv() { public void rollbackEnv() {
if (origin instanceof RemoteWorkspace && ((RemoteWorkspace) origin).getClient() instanceof FineWorkspaceHttpClient) { if (origin instanceof RemoteWorkspace && ((RemoteWorkspace) origin).getClient() instanceof FineWorkspaceHttpClient) {
TemplateLockInfoReSave.startListener();
((FineWorkspaceHttpClient) ((RemoteWorkspace) origin).getClient()).connect(); ((FineWorkspaceHttpClient) ((RemoteWorkspace) origin).getClient()).connect();
} }
} }

Loading…
Cancel
Save