Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serverDestroy always fails with error #4

Open
fabb opened this issue Sep 17, 2020 · 1 comment
Open

serverDestroy always fails with error #4

fabb opened this issue Sep 17, 2020 · 1 comment

Comments

@fabb
Copy link

fabb commented Sep 17, 2020

On shutdown, when serverDestroy is called, it always fails with this error:

Error happened during graceful shutdown TypeError: Cannot read property 'apply' of undefined

The problem seems to be that serverDestroy is defined like this:

const serverDestroy = promisify(server.destroy, server)

But server.destroy does not take a callback (anymore?):

destroy(error?: Error): void;

Looks like the callback was never meant to be used externally: nodejs/node#32809

@fabb
Copy link
Author

fabb commented Sep 17, 2020

Replacing server.destroy with server.close seems to work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant