You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onSend hook may has a cycle execution issue when calling next(new Error('some error')). For example:
fastify.addHook('onSend',function(request,reply,payload,next){next(newError('some error'));})fastify.get('/',function(request,reply){// it will never get here.})
if we start a GET / request, it'll timeout
As the current execution sequence is: onSend next(some error) -> wrapOnSendEnd -> onSendEnd -> handleError -> onSend hook
If onSend throws error again, the upper execution will start again.
onSend
hook may has a cycle execution issue when callingnext(new Error('some error'))
. For example:if we start a
GET /
request, it'll timeoutAs the current execution sequence is:
onSend next(some error)
->wrapOnSendEnd
->onSendEnd
->handleError
->onSend hook
If
onSend
throws error again, the upper execution will start again.Create a PR #410
The text was updated successfully, but these errors were encountered: