kopia lustrzana https://github.com/c9/core
commit
b44f0848dd
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* the default response timeout in node.js is 2min. If a request takes longer
|
||||
* to process then it needs to be increased
|
||||
*/
|
||||
|
||||
module.exports = function(timeout) {
|
||||
return function(req, res, next) {
|
||||
req.setTimeout(timeout);
|
||||
|
|
|
@ -111,6 +111,10 @@ function RestClient(host, port, config) {
|
|||
done(e);
|
||||
});
|
||||
|
||||
res.on("timeout", function() {
|
||||
done(new Error("Request timed out"));
|
||||
});
|
||||
|
||||
var called = false;
|
||||
function done(err, json) {
|
||||
if (called)
|
||||
|
|
Ładowanie…
Reference in New Issue