Update dns_proxy_js_query.go

This commit is contained in:
buffermet 2025-02-13 21:28:58 +01:00 committed by GitHub
parent 086eed49d5
commit c8c1072cc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -324,3 +324,11 @@ func (j *JSQuery) WasModified() bool {
// check if any of the fields has been changed
return j.NewHash() != j.refHash
}
func (j *JSQuery) CheckIfModifiedAndUpdateHash() bool {
// check if query was changed and update its hash
newHash := j.NewHash()
wasModified := j.refHash != newHash
j.refHash = newHash
return wasModified
}