Do I need to climb next () after res.send ()?

If I called res.send(), but did not call next():

  • Any middleware after this middleware will not be executed.
  • If this middleware is not the latest middleware, the request will hang up forever and will not be garbage collected because it is still waiting for a call next().

Above was my attempt to assert that I should always call next(), is that true?

+4
source share
1 answer

next() . res.send() res.json() .

next(), , , res.send().

+6

Source: https://habr.com/ru/post/1661328/


All Articles