fix sighup (#1452)

This commit is contained in:
Miko 2025-01-25 20:14:57 +01:00 committed by GitHub
parent 9bb270b6c5
commit 467203e125
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -775,8 +775,8 @@ export async function server(opts) {
console.log(`Caught signal ${signal}, refreshing`);
console.log('Stopping server and reloading config');
running.server.shutdown(() => {
const restarted = start(opts);
running.server.shutdown(async () => {
const restarted = await start(opts);
running.server = restarted.server;
running.app = restarted.app;
});