Skip to content

feat: use long living socket connection for sync #3841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2018

Conversation

KristianDD
Copy link
Contributor

@KristianDD KristianDD commented Aug 24, 2018

PR Checklist

What is the current behavior?

Every time a new LS operation is started a new socket connection is established with the application

What is the new behavior?

A connection is reused if possible for sync operations. And a connection is established in advance when the application is restarted.

Fixes/Implements/Closes #3843

@@ -85,6 +89,13 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
const canExecuteFastSync = !liveSyncInfo.isFullSync && this.canExecuteFastSyncForPaths(liveSyncInfo.modifiedFilesData, projectData, this.device.deviceInfo.platform);
if (!canExecuteFastSync || !liveSyncInfo.didRefresh) {
await this.device.applicationManager.restartApplication({ appId: liveSyncInfo.deviceAppData.appIdentifier, projectName: projectData.projectName });
if (this.livesyncTool.protocolVersion && semver.gte(this.livesyncTool.protocolVersion, AndroidDeviceSocketsLiveSyncService.MINIMAL_VESION_LONG_LIVING_CONNECTION)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? - Should be MINIMAL_VERSION_LONG_LIVING_CONNECTION

@KristianDD KristianDD force-pushed the kddmitrov/ls-android-long-living-socket branch from ba4adb5 to cb8a666 Compare August 24, 2018 12:39
@KristianDD KristianDD self-assigned this Aug 24, 2018
@KristianDD KristianDD added this to the 5.0.0 milestone Aug 24, 2018
@KristianDD KristianDD merged commit 547a000 into master Aug 28, 2018
@KristianDD KristianDD deleted the kddmitrov/ls-android-long-living-socket branch September 3, 2018 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants