Skip to content

Commit

Permalink
Ignore virtual requests once 'sails._exiting' flag is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Dec 23, 2014
1 parent e0c2b17 commit c3cdc64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ Router.prototype.route = function(req, res) {
var sails = this.sails;
var _privateRouter = this._privateRouter;

// If sails is `_exiting`, ignore the request.
if (sails._exiting) {
return;
}

// Provide access to `sails` object
req._sails = req._sails || sails;

Expand Down

0 comments on commit c3cdc64

Please sign in to comment.