Skip to content

Commit

Permalink
Fix type of timeout (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky committed Oct 23, 2020
1 parent 0e91989 commit c2c0bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const [custom] = sql`

## Teardown / Cleanup

To ensure proper teardown and cleanup on server restarts use `sql.end({ timeout: null })` before `process.exit()`.
To ensure proper teardown and cleanup on server restarts use `sql.end({ timeout: 0 })` before `process.exit()`.

Calling `sql.end()` will reject new queries and return a Promise which resolves when all queries are finished and the underlying connections are closed. If a timeout is provided any pending queries will be rejected once the timeout is reached and the connections will be destroyed.

Expand Down

0 comments on commit c2c0bf1

Please sign in to comment.