-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Small question here! I know that http-terminator tracks some state about the server, e.g. active sockets, in order to do its job. Does that imply that the terminator needs to be created before the server starts serving requests, so that it can track the state of the server prior to termination? I think it could be easy to assume you can just create the terminator at the moment you want to start tearing down the server, so I want to confirm whether or not that is intended usage. Thank you!
Example:
const server = http.createServer();
// Serve some requests
// Begin teardown
const httpTerminator = createHttpTerminator({ server });
await httpTerminator.terminate();
// ... or ...
const server = http.createServer();
const httpTerminator = createHttpTerminator({ server });
// Serve some requests
// Begin teardown
await httpTerminator.terminate();samal-rasmussen
Metadata
Metadata
Assignees
Labels
No labels