From: Avery Pennarun Date: Wed, 23 Oct 2019 04:08:52 +0000 (-0400) Subject: wintun: split error message for create vs open namespace. X-Git-Tag: 0.0.20201118~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aefb61355c9da539383dd0c2bc5f2bb3dbb3963;p=thirdparty%2Fwireguard-go.git wintun: split error message for create vs open namespace. Signed-off-by: Avery Pennarun --- diff --git a/tun/wintun/namespace_windows.go b/tun/wintun/namespace_windows.go index f4316fe..5f8a041 100644 --- a/tun/wintun/namespace_windows.go +++ b/tun/wintun/namespace_windows.go @@ -59,9 +59,12 @@ func initializeNamespace() error { if err == windows.ERROR_PATH_NOT_FOUND { continue } + if err != nil { + return fmt.Errorf("OpenPrivateNamespace failed: %v", err) + } } if err != nil { - return fmt.Errorf("Create/OpenPrivateNamespace failed: %v", err) + return fmt.Errorf("CreatePrivateNamespace failed: %v", err) } break }