From 01e8b3c71444c462817e8eb54a72c7d4bb413a8a Mon Sep 17 00:00:00 2001 From: Tsvetan Raikov Date: Thu, 30 Jun 2016 16:16:35 +0300 Subject: [PATCH] Fixed: Livesync both Android and iOS at the same time, only android updates --- lib/npm-installation-manager.ts | 5 +++-- lib/tools/broccoli/builder.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/npm-installation-manager.ts b/lib/npm-installation-manager.ts index 834c06104b..a2db18e9b6 100644 --- a/lib/npm-installation-manager.ts +++ b/lib/npm-installation-manager.ts @@ -2,6 +2,7 @@ import * as path from "path"; import * as semver from "semver"; import * as npm from "npm"; import * as constants from "./constants"; +import {sleep} from "../lib/common/helpers"; export class NpmInstallationManager implements INpmInstallationManager { private static NPM_LOAD_FAILED = "Failed to retrieve data from npm. Please try again a little bit later."; @@ -107,8 +108,8 @@ export class NpmInstallationManager implements INpmInstallationManager { public install(packageName: string, opts?: INpmInstallOptions): IFuture { return (() => { - while (this.$lockfile.check().wait()) { - ; + while(this.$lockfile.check().wait()) { + sleep(10); } this.$lockfile.lock().wait(); diff --git a/lib/tools/broccoli/builder.ts b/lib/tools/broccoli/builder.ts index cf88bc7f86..309e29d17e 100644 --- a/lib/tools/broccoli/builder.ts +++ b/lib/tools/broccoli/builder.ts @@ -5,6 +5,7 @@ import * as shelljs from "shelljs"; import Future = require("fibers/future"); import * as destCopyLib from "./node-modules-dest-copy"; import * as fiberBootstrap from "../../common/fiber-bootstrap"; +import {sleep} from "../../../lib/common/helpers"; let glob = require("glob"); @@ -35,8 +36,8 @@ export class Builder implements IBroccoliBuilder { }, (er: Error, files: string[]) => { fiberBootstrap.run(() => { - while (this.$lockfile.check().wait()) { - ; + while(this.$lockfile.check().wait()) { + sleep(10); } this.$lockfile.lock().wait();