In order for the calling code to be properly wait for the server to shutdown, it needs to be able to pass a callback to the close method so it gets notified of the close event.
await new Promise((resolve, reject) =>
repos.close((err) => err ? reject(err) : resolve())
)
Currently, it's necessary to use the close method on the server property directly.
await new Promise((resolve, reject) =>
repos.server.close((err) => err ? reject(err) : resolve())
)
In order for the calling code to be properly wait for the server to shutdown, it needs to be able to pass a callback to the close method so it gets notified of the close event.
Currently, it's necessary to use the close method on the server property directly.