Skip to content

Commit

Permalink
fix: index out of range error
Browse files Browse the repository at this point in the history
  • Loading branch information
Coronon committed Jul 25, 2023
1 parent 686903b commit ee33fef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions monitors/email_ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ func (m *emailPingMonitor) receive_email(data *emailData, shouldWaitForResponse
return message, 0, errors.New(message)
}
}
if len(uids) == 0 {
zap.S().Debugln("IMAP no response found - not waiting")

return "", 0, nil
}
zap.S().Debugln("IMAP response found")

// Fetch the reply email
Expand Down

0 comments on commit ee33fef

Please sign in to comment.