Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Nov 11, 2024
1 parent f92289f commit edf17e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ module.exports = class Router extends EventEmitter {

// avoid calling _preprocessRequest as async function as its slower
// but it seems like calling it as async has unintended consequence of resetting max call stack size
// so we only call it as async when the request has been through every 300 routes to reset it
// so call it as async when the request has been through every 300 routes to reset it
const continueRoute = this._paramCallbacks.size === 0 && req.routeCount % 300 !== 0 ?
this._preprocessRequest(req, res, route) : await this._preprocessRequest(req, res, route);

Expand Down

0 comments on commit edf17e1

Please sign in to comment.