Skip to content

Commit ce6f4fa

Browse files
author
rsora
committed
Implement stats flush anyway to leverage module no-op in case of no handler configured
1 parent e1582e7 commit ce6f4fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cli/daemon/daemon.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
103103
go func() {
104104
// Stdin is closed when the controlling parent process ends
105105
_, _ = io.Copy(ioutil.Discard, os.Stdin)
106-
if viper.GetBool("telemetry.enabled") {
107-
stats.Flush()
108-
}
106+
// Flush telemetry stats (this is a no-op if telemetry is disabled)
107+
stats.Flush()
109108
os.Exit(0)
110109
}()
111110
}

0 commit comments

Comments
 (0)