From dba3ab248f419e8f4edc17dc3d377186a12d9527 Mon Sep 17 00:00:00 2001 From: loicsaintroch Date: Tue, 19 Jan 2016 17:06:09 +0100 Subject: [PATCH] Remove hook timeout --- lib/private/loadHooks.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/private/loadHooks.js b/lib/private/loadHooks.js index aa0e80cd78..f833b77096 100755 --- a/lib/private/loadHooks.js +++ b/lib/private/loadHooks.js @@ -82,18 +82,7 @@ module.exports = function (strapi) { // Load a hook and initialize it. function loadHook(id, cb) { - const timeoutInterval = 5000; - let hookTimeout; - - hookTimeout = setTimeout(function tooLong() { - const hooksTookTooLongErr = 'The hook `' + id + '` is taking too long to load.'; - const err = new Error(hooksTookTooLongErr); - err.code = 'E_HOOK_TIMEOUT'; - cb(err); - }, timeoutInterval); - hooks[id].load(function (err) { - clearTimeout(hookTimeout); if (err) { strapi.log.error('The hook `' + id + '` failed to load!'); strapi.emit('hook:' + id + ':error');