fastify / fastify-vite

Fastify plugin for Vite integration
MIT License
885 stars 73 forks source link

process.exit() will exit with code 13 #69

Closed galvez closed 2 years ago

galvez commented 2 years ago

Prerequisites

Fastify version

3.x

Plugin version

3.x

Node.js version

16.x

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

11.0.1

Description

As uncovered by https://github.com/fastify/fastify-vite/pull/65, process.exit() is incorrectly exiting with exit code 13.

This probably means we're exiting in an unsafe one — we should probably do app.close() before.

Steps to Reproduce

Run process.exit() after Fastify server started.

Expected Behavior

Exit code 0

galvez commented 2 years ago

No longer relevant after the v3 release.