fix nil ptr

This commit is contained in:
Niko Storni 2022-09-27 22:56:34 +02:00
parent 5f52a995a7
commit 77944ba3af

View file

@ -81,7 +81,7 @@ func sendToSlack(channel, username, message string) error {
log.Debugln("slack: " + channel + ": " + message)
for {
_, _, err = slackApi.PostMessage(channel, slack.MsgOptionText(message, false), slack.MsgOptionUsername(username))
if strings.Contains(err.Error(), "timeout awaiting response headers") {
if err != nil && strings.Contains(err.Error(), "timeout awaiting response headers") {
continue
}
break