Skip to content

Commit 013a739

Browse files
committed
Refactor server stop and logging in application teardown
1 parent d84000d commit 013a739

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/app.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,13 @@ export async function setupApplication(config: Config): Promise<{ stats: Stats;
132132

133133
stopRandomActivateAudio()
134134

135-
if (server) {
136-
server.stop()
137-
}
138-
139135
await stats.stop()
140136

141137
if (config.throttleConfig) {
142138
await stopThrottle()
143139
}
144140

145141
stopTimers()
146-
log.debug('Stopped')
147142

148143
// vmaf score.
149144
if (config.vmafPath) {
@@ -173,6 +168,12 @@ export async function setupApplication(config: Config): Promise<{ stats: Stats;
173168
log.debug(`docker logs not found: ${(err as Error).message}`)
174169
}
175170
}
171+
172+
if (server) {
173+
server.stop()
174+
}
175+
176+
log.debug('Stopped')
176177
},
177178
}
178179
}

0 commit comments

Comments
 (0)