Skip to content

Commit

Permalink
fix: [FSTDEP012] DeprecationWarning: request.context property access …
Browse files Browse the repository at this point in the history
…is deprecated. (#228)
  • Loading branch information
ildella authored Jul 6, 2024
1 parent 37b2d15 commit dad71b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async function fastifyUnderPressure (fastify, opts) {
}

function onRequest (req, reply, next) {
const _pressureHandler = req.context.config.pressureHandler || pressureHandler
const _pressureHandler = req.routeOptions.config.pressureHandler || pressureHandler
if (checkMaxEventLoopDelay && eventLoopDelay > maxEventLoopDelay) {
handlePressure(_pressureHandler, req, reply, next, TYPE_EVENT_LOOP_DELAY, eventLoopDelay)
return
Expand Down

0 comments on commit dad71b7

Please sign in to comment.