Fix error reporting (#128)

Put error back in the correct place in the directives.go. Also don't
make it a pointer. If it *is* a pointer the buildstack function does
not correctly set the Next Handler. Don't understand *why* this is
different from Caddy. Anyway this fixes it, with the caveat that
the error log file is now openend earlier in the startup.

Fixes #127
This commit is contained in:
Miek Gieben 2016-04-19 22:51:23 +01:00
parent a1e6cb7cf4
commit e726dca2ee
3 changed files with 40 additions and 48 deletions

View file

@ -73,7 +73,6 @@ func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
return e.Err(zone, dns.RcodeNameError, state)
}
if err != nil {
println("returning error", err.Error())
return dns.RcodeServerFailure, err
}