restify / node-restify

The future of Node.js REST development
http://restify.com
MIT License
10.71k stars 984 forks source link

stop handling `then` when `next` is called #1942

Open twksos opened 1 year ago

twksos commented 1 year ago

Pre-Submission Checklist

Issues

Closes:

Summarize the issues that discussed these changes

currently, the async function handling does not meet user's expectation. a function returning Promise can still have the next param and:

Changes

add a local variable to check whether next is called and wrap the next function.

What does this PR do?

twksos commented 1 year ago

Hi @mmarchini, could you review this PR when you have time?