From d7cb9a50ba01c7f1b6de5b7ef6b7e97d7b8dcf19 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Mon, 4 Sep 2023 16:55:40 +0100 Subject: [PATCH] fix: fix error when calling service.start() Currently `service.start()` must be called with `opts: { probe: boolean }`. This isn't documented. Two possible fixes: - Update the docs to document the required parameter for `service.start(opts)` - Integrate the change here which starts the service with the same config.probe that the service was created with. --- src/lib/registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/registry.ts b/src/lib/registry.ts index 4286b92..7aed5ae 100644 --- a/src/lib/registry.ts +++ b/src/lib/registry.ts @@ -52,9 +52,9 @@ export class Registry { } const service = new Service(config) - service.start = start.bind(null, service, this) + service.start = start.bind(null, service, this, { probe: config.probe !== false }) service.stop = stop.bind(null, service, this) - service.start({ probe: config.probe !== false }) + service.start() return service }