From af46d66cc6a09b4d1286b06aad714c8c731aa63e Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Fri, 16 Jul 2021 12:55:40 -0700 Subject: [PATCH] fix: correct source hook to be pre-stop hook --- runner/sidecar/sources.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/sidecar/sources.go b/runner/sidecar/sources.go index 4eb48bae..4c7b5ba3 100644 --- a/runner/sidecar/sources.go +++ b/runner/sidecar/sources.go @@ -87,7 +87,7 @@ func connectSources(ctx context.Context, toMain func(context.Context, []byte) er } if x, ok := sources[sourceName].(io.Closer); ok { logger.Info("adding pre-stop hook", "source", sourceName) - addStopHook(func(ctx context.Context) error { + addPreStopHook(func(ctx context.Context) error { logger.Info("closing", "source", sourceName) return x.Close() })