- fix crash after stats module is closed

Close DNS forward module BEFORE stats.
This commit is contained in:
Simon Zolin
2019-09-16 15:54:41 +03:00
parent a71521a658
commit d7f256ba7f
3 changed files with 20 additions and 0 deletions

View File

@@ -420,6 +420,7 @@ func (s *statsCtx) Clear() {
func (s *statsCtx) Update(e Entry) {
if e.Result == 0 ||
e.Result >= rLast ||
len(e.Domain) == 0 ||
!(len(e.Client) == 4 || len(e.Client) == 16) {
return