Skip to content
Snippets Groups Projects
Commit 01a1d981 authored by Philipp Heckel's avatar Philipp Heckel
Browse files

fix nil pointer

parent e7f8fc93
No related branches found
No related tags found
No related merge requests found
......@@ -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)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment