From 6aefb61355c9da539383dd0c2bc5f2bb3dbb3963 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Wed, 23 Oct 2019 00:08:52 -0400 Subject: wintun: split error message for create vs open namespace. Signed-off-by: Avery Pennarun --- tun/wintun/namespace_windows.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3-54-g00ecf