mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 06:07:36 +03:00
Tone down some errors
This commit is contained in:
parent
b46775ae0c
commit
16b2c84147
2 changed files with 5 additions and 9 deletions
|
@ -30,7 +30,7 @@ func main() {
|
||||||
tzErr := TimezoneSetup()
|
tzErr := TimezoneSetup()
|
||||||
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
|
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
|
||||||
if tzErr != nil {
|
if tzErr != nil {
|
||||||
dlog.Errorf("Timezone setup failed: %v", tzErr)
|
dlog.Warnf("Timezone setup failed: [%v]", tzErr)
|
||||||
}
|
}
|
||||||
runtime.MemProfileRate = 0
|
runtime.MemProfileRate = 0
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ func (app *App) AppMain() {
|
||||||
dlog.Fatal(err)
|
dlog.Fatal(err)
|
||||||
}
|
}
|
||||||
if err := PidFileCreate(); err != nil {
|
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 {
|
if err := app.proxy.InitPluginsGlobals(); err != nil {
|
||||||
dlog.Fatal(err)
|
dlog.Fatal(err)
|
||||||
|
@ -145,7 +145,7 @@ func (app *App) AppMain() {
|
||||||
|
|
||||||
func (app *App) Stop(service service.Service) error {
|
func (app *App) Stop(service service.Service) error {
|
||||||
if err := PidFileRemove(); err != nil {
|
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.")
|
dlog.Notice("Stopped.")
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -615,9 +615,7 @@ func dohTestPacket(msgID uint16) []byte {
|
||||||
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
|
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
|
||||||
ext := new(dns.EDNS0_PADDING)
|
ext := new(dns.EDNS0_PADDING)
|
||||||
ext.Padding = make([]byte, 16)
|
ext.Padding = make([]byte, 16)
|
||||||
if _, err := crypto_rand.Read(ext.Padding); err != nil {
|
_, _ = crypto_rand.Read(ext.Padding)
|
||||||
dlog.Fatal(err)
|
|
||||||
}
|
|
||||||
edns0 := msg.IsEdns0()
|
edns0 := msg.IsEdns0()
|
||||||
edns0.Option = append(edns0.Option, ext)
|
edns0.Option = append(edns0.Option, ext)
|
||||||
body, err := msg.Pack()
|
body, err := msg.Pack()
|
||||||
|
@ -640,9 +638,7 @@ func dohNXTestPacket(msgID uint16) []byte {
|
||||||
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
|
msg.SetEdns0(uint16(MaxDNSPacketSize), false)
|
||||||
ext := new(dns.EDNS0_PADDING)
|
ext := new(dns.EDNS0_PADDING)
|
||||||
ext.Padding = make([]byte, 16)
|
ext.Padding = make([]byte, 16)
|
||||||
if _, err := crypto_rand.Read(ext.Padding); err != nil {
|
_, _ = crypto_rand.Read(ext.Padding)
|
||||||
dlog.Fatal(err)
|
|
||||||
}
|
|
||||||
edns0 := msg.IsEdns0()
|
edns0 := msg.IsEdns0()
|
||||||
edns0.Option = append(edns0.Option, ext)
|
edns0.Option = append(edns0.Option, ext)
|
||||||
body, err := msg.Pack()
|
body, err := msg.Pack()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue