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

Close Hook not awaited #2735

Open
kaaax0815 opened this issue Sep 13, 2024 · 0 comments
Open

Close Hook not awaited #2735

kaaax0815 opened this issue Sep 13, 2024 · 0 comments

Comments

@kaaax0815
Copy link

Environment

"nuxt": "^3.13.0"

Reproduction

plugin

import { writeFile } from 'node:fs/promises';

export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('close', async () => {
    console.log('Shutting down');
    await WireGuard.Shutdown();
    await writeFile('/etc/wireguard/test.lock', '');
  });
});

Describe the bug

If I stop the nuxt server the File wont be created

Additional context

No response

Logs

No response

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

No branches or pull requests

1 participant