From 553c6c78fe8ac2194ae1bb312af1209b485d39dc Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 22 May 2011 09:27:00 -0700 Subject: [PATCH] Raise PhabricatorShapedRequest request timeout Summary: We hit this very short (1s) timeout when the browser chooses to resolve all the diff requests before the preview request. In the long term we could start the preview request only after all the diff requests resolve, but this solves the issue for now and there's no reason for such a short timeout. The historical reason to have this timeout at all is that intern was megaflaky and that's no longer a problem. Test Plan: Faked it so it would use a 1ms timeout the first time and then a 20s timeout; got reasonable behavior. Reviewed By: aran Reviewers: jungejason, tuomaspelkonen, aran CC: aran Differential Revision: 329 --- externals/javelin | 2 +- webroot/rsrc/js/application/core/ShapedRequest.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/externals/javelin b/externals/javelin index d9a1cb4c16..7ac64cd03d 160000 --- a/externals/javelin +++ b/externals/javelin @@ -1 +1 @@ -Subproject commit d9a1cb4c16866aec38f062eee9f3d2129c885b62 +Subproject commit 7ac64cd03d89d6d5f8c7f85b32c9611d3866ea2b diff --git a/webroot/rsrc/js/application/core/ShapedRequest.js b/webroot/rsrc/js/application/core/ShapedRequest.js index d993e6680a..dd03b30def 100644 --- a/webroot/rsrc/js/application/core/ShapedRequest.js +++ b/webroot/rsrc/js/application/core/ShapedRequest.js @@ -61,7 +61,7 @@ JX.install('PhabricatorShapedRequest', { this._request = null; })); request.setData(data); - request.setTimeout(this.getFrequency()); + request.setTimeout(this.getRequestTimeout()); request.send(); } else { this._defer = JX.defer( @@ -87,6 +87,7 @@ JX.install('PhabricatorShapedRequest', { properties : { rateLimit : 500, - frequency : 1000 + frequency : 1000, + requestTimeout : 20000 } });