Refresh: Fixed bug that emulator-manager go to hanging state when refresh.
authorminkee.lee <minkee.lee@samsung.com>
Wed, 10 Dec 2014 07:33:04 +0000 (16:33 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Wed, 10 Dec 2014 07:48:16 +0000 (16:48 +0900)
- This happens when another emulator-manager's VM is running.

Change-Id: Id87c39b65ef50884b8d124a3a1bd1160ce1fdd7b
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
common-project/src/org/tizen/emulator/manager/vms/helper/CheckingRunningEmulator.java

index afa44e0..aa052d6 100644 (file)
@@ -443,11 +443,14 @@ public class CheckingRunningEmulator {
                }
 
                private void settingProperty(String path, VMSocket vms) {
+                       if (vms != null) {
+                               RefreshWorker.addToFinishedSet(vms.getEcs_port());
+                       }
+
                        for (VMProperty prop : (VMProperty[])(EmulatorVMList.getInstance().getProperties())) {
                                String imagePath = prop.getChildImagePath();
                                String swapImagePath = prop.getSwapImagePathTmp(); // tmp
-                               if (imagePath != null &&
-                                               (path.equals(imagePath) || path.equals(swapImagePath)) ) {
+                               if (path.equals(imagePath) || path.equals(swapImagePath)) {
                                        if (vms != null) {
                                                vms.setProperty(prop);
                                                RefreshWorker.addToFinishedSet(vms.getEcs_port());