Skip to content

Commit

Permalink
docs: correct usage (promises instead of next callback) (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored Aug 9, 2024
1 parent 1e8d8e4 commit 60a7ddb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ fastify.register(require('fastify-graceful-shutdown'))

```js
fastify.after(() => {
fastify.gracefulShutdown((signal, next) => {
fastify.gracefulShutdown(async (signal) => {
fastify.log.info('Received signal to shutdown: %s', signal)
next()
await doSomethingAsync()
})
})
```
Expand Down

0 comments on commit 60a7ddb

Please sign in to comment.