Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit a44d4b1

Browse files
authored
Merge pull request #220 from codeoverflow-org/fix/only-stop-svc-when-defined
Only stop client on exit when it is defined
2 parents 5c8d7a9 + a0693fa commit a44d4b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nodecg-io-core/extension/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function onExit(
8585
if (instances[key] !== undefined) {
8686
const client = instances[key]?.client;
8787
const service = serviceManager.getService(instances[key]?.serviceType as string);
88-
if (!service.failed) {
88+
if (!service.failed && client) {
8989
nodecg.log.info(`Stopping service ${key} of type ${service.result.serviceType}.`);
9090
try {
9191
service.result.stopClient(client);

0 commit comments

Comments
 (0)