moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
292 stars 119 forks source link

fix: resolve promise when close event is fired for res #301

Closed michelevincenzi closed 2 years ago

michelevincenzi commented 2 years ago

Hello, this PR to change the "close" event handler from reject to resolve in order to make the promise end with no errors. When a http requested is issued and then cancelled by the client the "finish" event is not triggered (https://nodejs.org/docs/latest-v16.x/api/http.html#event-close_1)

Thanks!

icebob commented 2 years ago

ping @giovanni-bertoncelli