Skip to content

Commit 70dbe96

Browse files
author
Roberto Sora
committed
Add stats flush in case of a not daemonized cli daemon proces
1 parent 420742c commit 70dbe96

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
@@ -93,6 +93,9 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
9393
go func() {
9494
// stdin is closed when the controlling parent process ends
9595
_, _ = io.Copy(ioutil.Discard, os.Stdin)
96+
if viper.GetBool("telemetry.enabled") {
97+
telemetry.Engine.Flush()
98+
}
9699
os.Exit(0)
97100
}()
98101
}

0 commit comments

Comments
 (0)