Prerequisites
Last working version
3.29.0
Stopped working in version
4.0.0
Node.js version
18.4.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.4
💥 Regression Report
As of fastify 4, fastify does not wait for requests made before instance.close was called to finish, rather it shuts down immediately and hangs up the connection.
Steps to Reproduce
A repo that repros the issue is available here
Steps to reproduce the issue:
$ git clone [email protected]:corevo/fastify-shutdown-regression.git
$ cd fastify-3
$ npm i
$ npm t
# should exit with 'OK' and exit code 0
$ cd fastify-4
$ npm i
$ npm t
# will instead fail on socket hang up
Expected Behavior
When calling instance.close fastify should wait up to a certain (ideally configurable) grace period, for any request that has already been made prior to closing to finish.
Prerequisites
Last working version
3.29.0
Stopped working in version
4.0.0
Node.js version
18.4.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.4
💥 Regression Report
As of fastify 4, fastify does not wait for requests made before
instance.closewas called to finish, rather it shuts down immediately and hangs up the connection.Steps to Reproduce
A repo that repros the issue is available here
Steps to reproduce the issue:
Expected Behavior
When calling
instance.closefastify should wait up to a certain (ideally configurable) grace period, for any request that has already been made prior to closing to finish.