aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/services/errors.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-06-22 19:54:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-06-22 19:56:14 +0200
commite99d28cf81a6d39a8ea102de48d1cd866ad351db (patch)
treece194526397dcc82a482b195b578f0e9580cb9a2 /services/errors.go
parentversion: bump (diff)
downloadwireguard-windows-e99d28cf81a6d39a8ea102de48d1cd866ad351db.tar.xz
wireguard-windows-e99d28cf81a6d39a8ea102de48d1cd866ad351db.zip
manager: do not terminate current process when intended target is child
If we've already collected this, handle is -1, which is current process. Catch this case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'services/errors.go')
-rw-r--r--services/errors.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/errors.go b/services/errors.go
index 569585a5..674c083b 100644
--- a/services/errors.go
+++ b/services/errors.go
@@ -7,7 +7,6 @@ package services
import (
"fmt"
- "syscall"
"golang.org/x/sys/windows"
)
@@ -73,7 +72,7 @@ func (e Error) Error() string {
}
func DetermineErrorCode(err error, serviceError Error) (bool, uint32) {
- if syserr, ok := err.(syscall.Errno); ok {
+ if syserr, ok := err.(windows.Errno); ok {
return false, uint32(syserr)
} else if serviceError != ErrorSuccess {
return true, uint32(serviceError)