From e2a5bc1a3557c3b6bc5121bdeca0ddbbfbc868bb Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Mon, 9 Jan 2017 11:11:07 -0800 Subject: [PATCH] packager: socket timeout for global cache Reviewed By: davidaurelio Differential Revision: D4393059 fbshipit-source-id: 23c0c9ab69388ffd6de136d07728d44d1d8a947a --- packager/react-packager/src/lib/GlobalTransformCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packager/react-packager/src/lib/GlobalTransformCache.js b/packager/react-packager/src/lib/GlobalTransformCache.js index dcf327ee3..77565905c 100644 --- a/packager/react-packager/src/lib/GlobalTransformCache.js +++ b/packager/react-packager/src/lib/GlobalTransformCache.js @@ -273,7 +273,7 @@ class GlobalTransformCache { * megabytes each. */ _fetchFromURI(uri: string, callback: FetchCallback) { - request.get({uri, json: true}, (error, response, unvalidatedResult) => { + request.get({uri, json: true, timeout: 4000}, (error, response, unvalidatedResult) => { if (error != null) { callback(error); return;