alexliesenfeld / health

A simple and flexible health check library for Go.
MIT License
775 stars 38 forks source link

Duplicate call to checker Start()? #4

Closed panta closed 3 years ago

panta commented 3 years ago

Is the call to handler (and thus checker) Start() duplicate here:

https://github.com/alexliesenfeld/health/blob/39c698eac61dfe95c78f2535d2f77e669f9ac5e1/config.go#L55-L57

since it's already done from newChecker() here?

https://github.com/alexliesenfeld/health/blob/39c698eac61dfe95c78f2535d2f77e669f9ac5e1/check.go#L89-L92

Also I wonder if the cancel() deferral doesn't immediately terminate the check here:

https://github.com/alexliesenfeld/health/blob/39c698eac61dfe95c78f2535d2f77e669f9ac5e1/handler.go#L23-L32

alexliesenfeld commented 3 years ago

Fixed as part of refactoring in commit 6875c62dfaee5efd7db9d9cbfad07ddb6472e393.