Skip to content

Commit c867146

Browse files
Merge pull request #1712 from NativeScript/vladimirov/fix-livesync-ios
Fix livesync --watch for ios devices
2 parents c9f4704 + 8020a78 commit c867146

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/services/livesync/ios-livesync-service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ class IOSLiveSyncService extends liveSyncServiceBaseLib.LiveSyncServiceBase<Mobi
4949
}
5050
this.$iOSEmulatorServices.postDarwinNotification(this.$iOSNotification.attachRequest).wait();
5151
} else {
52-
this.$iOSSocketRequestExecutor.executeAttachRequest(this.device, timeout).wait();
53-
this.socket = this.device.connectToPort(IOSLiveSyncService.BACKEND_PORT);
52+
if(!this.socket) {
53+
this.$iOSSocketRequestExecutor.executeAttachRequest(this.device, timeout).wait();
54+
this.socket = this.device.connectToPort(IOSLiveSyncService.BACKEND_PORT);
55+
}
5456
this.sendPageReloadMessage();
5557
}
5658
}).future<void>()();

0 commit comments

Comments
 (0)