Tone down some errors

This commit is contained in:
Frank Denis 2023-06-24 22:23:30 +02:00
parent b46775ae0c
commit 16b2c84147
2 changed files with 5 additions and 9 deletions

View File

@ -30,7 +30,7 @@ func main() {
tzErr := TimezoneSetup()
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
if tzErr != nil {
dlog.Errorf("Timezone setup failed: %v", tzErr)
dlog.Warnf("Timezone setup failed: [%v]", tzErr)
}
runtime.MemProfileRate = 0
@ -129,7 +129,7 @@ func (app *App) AppMain() {
dlog.Fatal(err)
}
if err := PidFileCreate(); err != nil {
dlog.Criticalf("Unable to create the PID file: %v", err)
dlog.Errorf("Unable to create the PID file: [%v]", err)
}
if err := app.proxy.InitPluginsGlobals(); err != nil {
dlog.Fatal(err)
@ -145,7 +145,7 @@ func (app *App) AppMain() {
func (app *App) Stop(service service.Service) error {
if err := PidFileRemove(); err != nil {
dlog.Warnf("Failed to remove the PID file: %v", err)
dlog.Warnf("Failed to remove the PID file: [%v]", err)
}
dlog.Notice("Stopped.")
return nil

View File

@ -615,9 +615,7 @@ func dohTestPacket(msgID uint16) []byte {
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
ext := new(dns.EDNS0_PADDING)
ext.Padding = make([]byte, 16)
if _, err := crypto_rand.Read(ext.Padding); err != nil {
dlog.Fatal(err)
}
_, _ = crypto_rand.Read(ext.Padding)
edns0 := msg.IsEdns0()
edns0.Option = append(edns0.Option, ext)
body, err := msg.Pack()
@ -640,9 +638,7 @@ func dohNXTestPacket(msgID uint16) []byte {
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
ext := new(dns.EDNS0_PADDING)
ext.Padding = make([]byte, 16)
if _, err := crypto_rand.Read(ext.Padding); err != nil {
dlog.Fatal(err)
}
_, _ = crypto_rand.Read(ext.Padding)
edns0 := msg.IsEdns0()
edns0.Option = append(edns0.Option, ext)
body, err := msg.Pack()