Skip to content

Commit bb971a7

Browse files
author
Roberto Sora
committed
Add stats flush in case of a not daemonized cli daemon proces
1 parent 3ae3807 commit bb971a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/daemon/daemon.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
101101
go func() {
102102
// Stdin is closed when the controlling parent process ends
103103
_, _ = io.Copy(ioutil.Discard, os.Stdin)
104+
if viper.GetBool("telemetry.enabled") {
105+
telemetry.Engine.Flush()
106+
}
104107
os.Exit(0)
105108
}()
106109
}

0 commit comments

Comments
 (0)