Skip to content

Commit

Permalink
Kill the process first before sending Telegram msg
Browse files Browse the repository at this point in the history
If the internet connection is completely lost we do not want to wait until it is available again
  • Loading branch information
tzerk committed Mar 19, 2017
1 parent a2a4bd0 commit 7e3fceb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/watchdog.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func Watchdog(
time.Sleep(5 * time.Second)
}

// Use the Telegram API to send a message
Send_TelegramMessage(config, label_Update, pb)

// Optional (YAML file, default: false): keep ts program open even if
// the process is disconnected
if !config.StayAlive {
Expand Down

1 comment on commit 7e3fceb

@tzerk
Copy link
Owner Author

@tzerk tzerk commented on 7e3fceb Mar 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refers to #10

Please sign in to comment.