mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Fix deadlock in settings update and add efficient DNS settings validation
This commit is contained in:
@@ -84,7 +84,7 @@ func (d *DNSDiscovery) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
|
||||
} else {
|
||||
// Forward to real DNS
|
||||
if d.upstreamDNS == "" {
|
||||
d.throttledLog(fmt.Sprintf("[DNS ERROR] No upstream DNS configured, cannot forward %s", hostname))
|
||||
d.throttledLog("[DNS ERROR] No upstream DNS configured, cannot forward")
|
||||
|
||||
m := new(dns.Msg)
|
||||
m.SetReply(r)
|
||||
|
||||
@@ -273,6 +273,8 @@ func TestDNSDiscovery_EmptyUpstream(t *testing.T) {
|
||||
if rw.msg.Rcode != dns.RcodeServerFailure {
|
||||
t.Errorf("Expected RcodeServerFailure (2) for empty upstream, got %d", rw.msg.Rcode)
|
||||
}
|
||||
|
||||
// Verify log message (optional, but good to check it's the simplified one)
|
||||
}
|
||||
|
||||
func TestDNSDiscovery_ForwardTimeout(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user