Merge branch 'master' into fix/596

This commit is contained in:
Aleksey Dmitrevskiy
2019-03-06 18:25:42 +03:00
12 changed files with 459 additions and 319 deletions

View File

@@ -158,6 +158,11 @@ func (d *dayTop) addEntry(entry *logEntry, q *dns.Msg, now time.Time) error {
hostname := strings.ToLower(strings.TrimSuffix(q.Question[0].Name, "."))
// if question hostname is empty, do nothing
if hostname == "" {
return nil
}
// get value, if not set, crate one
d.hoursReadLock()
defer d.hoursReadUnlock()