-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
One of the multiple ways to reproduce it:
'use strict'
const http = require('http')
const fastify = require('fastify')
let counter = 0
const serverFactory = (handler, opts) => {
if (++counter > 1) {
throw new Error('kaboom')
}
const server = http.createServer((req, res) => {
handler(req, res)
})
return server
}
const app = fastify({ serverFactory })
async function main () {
try {
await app.listen()
} catch (err) {
console.log(err)
}
await app.close()
}
process.on('uncaughtException', (err) => {
console.log('uncaughtException', err)
})
main()The reject is ignored here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels