mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-01-18 16:17:26 +01:00
fix nil pointer
This commit is contained in:
@@ -735,8 +735,11 @@ func (s *Server) updateStatsAndPrune() {
|
||||
messages += msgs
|
||||
}
|
||||
|
||||
// Mail
|
||||
mailSuccess, mailFailure := s.smtpBackend.Counts()
|
||||
// Mail stats
|
||||
var mailSuccess, mailFailure int64
|
||||
if s.smtpBackend != nil {
|
||||
mailSuccess, mailFailure = s.smtpBackend.Counts()
|
||||
}
|
||||
|
||||
// Print stats
|
||||
log.Printf("Stats: %d message(s) published, %d in cache, %d successful mails, %d failed, %d topic(s) active, %d subscriber(s), %d visitor(s)",
|
||||
|
||||
Reference in New Issue
Block a user