Skip to content

Bug in pool.end () never returns when trying to close cleanly #2341

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

Open
mehtcrystals opened this issue Sep 10, 2020 · 1 comment
Open

Bug in pool.end () never returns when trying to close cleanly #2341

mehtcrystals opened this issue Sep 10, 2020 · 1 comment

Comments

@mehtcrystals
Copy link

I have the following code to terminate nodejs cleanly:

process.on('SIGINT', () => {
  console.info('Señal SIGINT recivida');
  console.log('Cerrando el servidor....');
  server.close(() => {
    console.log('Servidor http detenido');
    pool.end()
    .then(() => {
      console.log('\u001b[36m\u001b[1mConexion a la base de datos terminada\u001b[0m\n')
      process.exit(0)
    })
  });
});

but when I call pool.end() it just doesn't return to execute what's in the .then ()

@AleCaste
Copy link

AleCaste commented Feb 9, 2021

The same thing happens to me using client.end()

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

2 participants