From ceed9051964f2b77a1057bae9c1c81ab44e5746e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 25 Oct 2019 12:53:59 +0200 Subject: [PATCH] Add a more explicit message when a user is set on Windows --- dnscrypt-proxy/proxy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dnscrypt-proxy/proxy.go b/dnscrypt-proxy/proxy.go index 3013bb09..4152c66a 100644 --- a/dnscrypt-proxy/proxy.go +++ b/dnscrypt-proxy/proxy.go @@ -117,11 +117,11 @@ func (proxy *Proxy) StartProxy() { fdUDP, err := listenerUDP.File() // On Windows, the File method of UDPConn is not implemented. if err != nil { - dlog.Fatal(err) + dlog.Fatalf("Unable to switch to a different user: %v", err) } fdTCP, err := listenerTCP.File() // On Windows, the File method of TCPListener is not implemented. if err != nil { - dlog.Fatal(err) + dlog.Fatalf("Unable to switch to a different user: %v", err) } defer listenerUDP.Close() defer listenerTCP.Close() @@ -133,13 +133,13 @@ func (proxy *Proxy) StartProxy() { // child listenerUDP, err := net.FilePacketConn(os.NewFile(uintptr(3+FileDescriptorNum), "listenerUDP")) if err != nil { - dlog.Fatal(err) + dlog.Fatalf("Unable to switch to a different user: %v", err) } FileDescriptorNum++ listenerTCP, err := net.FileListener(os.NewFile(uintptr(3+FileDescriptorNum), "listenerTCP")) if err != nil { - dlog.Fatal(err) + dlog.Fatalf("Unable to switch to a different user: %v", err) } FileDescriptorNum++