Skip to content

Commit 3fe0e20

Browse files
author
Tsvetan Raikov
committed
Fixed: Livesync both Android and iOS at the same time, only android updates
1 parent 3a7d7fc commit 3fe0e20

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

lib/npm-installation-manager.ts

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ export class NpmInstallationManager implements INpmInstallationManager {
106106

107107
public install(packageName: string, opts?: INpmInstallOptions): IFuture<string> {
108108
return (() => {
109+
110+
while (this.$lockfile.check().wait()) {
111+
;
112+
}
113+
109114
this.$lockfile.lock().wait();
110115

111116
try {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as path from "path";
77
import * as net from "net";
88

99
class AndroidLiveSyncService extends liveSyncServiceBaseLib.LiveSyncServiceBase<Mobile.IAndroidDevice> implements IPlatformLiveSyncService {
10-
private static BACKEND_PORT = 18181;
10+
private static BACKEND_PORT = 18182;
1111

1212
constructor(_device: Mobile.IDevice,
1313
private $fs: IFileSystem,

lib/tools/broccoli/builder.ts

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export class Builder implements IBroccoliBuilder {
3434
stat: true
3535
}, (er: Error, files: string[]) => {
3636
fiberBootstrap.run(() => {
37+
38+
while (this.$lockfile.check().wait()) {
39+
;
40+
}
41+
3742
this.$lockfile.lock().wait();
3843
if (er) {
3944
if (!future.isResolved()) {

test/stubs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ export class HooksServiceStub implements IHooksService {
410410
}
411411

412412
export class LockFile {
413+
414+
check(): IFuture<boolean> {
415+
return (() => { return false; }).future<boolean>()();
416+
}
417+
413418
lock(): IFuture<void> {
414419
return (() => {}).future<void>()();
415420
}

0 commit comments

Comments
 (0)