Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] Pull liftTimeout to http hook defaults #7213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/hooks/http/index.js
Expand Up @@ -29,6 +29,9 @@ module.exports = function(sails) {
// Port to run this app on
port: 1337,

// How long before warning Sails is taking too long to lift.
liftTimeout: 4000,

// SSL cert settings end up here
ssl: {},

Expand Down
5 changes: 1 addition & 4 deletions lib/hooks/http/start.js
Expand Up @@ -12,9 +12,6 @@ module.exports = function (sails) {

// Used to warn about possible issues if starting the server is taking a long time
var liftAbortTimer;
var liftTimeout = sails.config.liftTimeout || 4000;
// TODO: pull this defaulting into `defaults`
// and also ensure this config is properly documented.

async.auto({

Expand All @@ -40,7 +37,7 @@ module.exports = function (sails) {
}

// Start timer in case this takes suspiciously long...
liftAbortTimer = setTimeout(failedToStart, liftTimeout);
liftAbortTimer = setTimeout(failedToStart, sails.config.liftTimeout);

// If the server fails to start because of an error, or if it's just taking
// too long, show some troubleshooting notes and bail out.
Expand Down