From 0f73070a5711fe05f0cd21cccee8cab47ac64414 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Sun, 8 Mar 2020 08:49:57 -0400 Subject: [PATCH] wgengine: shut down wireguard on Close This was (presumably) missing from wgengine because the interactions between magicsock and wireguard-go meant that the shutdown never worked. Now those are fixed, actually shut down. Fixes occasional flake in expanded ipn/e2e_test. Signed-off-by: David Crawshaw --- wgengine/userspace.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wgengine/userspace.go b/wgengine/userspace.go index 73f8f5789..e0d40ac3b 100644 --- a/wgengine/userspace.go +++ b/wgengine/userspace.go @@ -575,6 +575,7 @@ func (e *userspaceEngine) Close() { r := bufio.NewReader(strings.NewReader("")) e.wgdev.IpcSetOperation(r) + e.wgdev.Close() e.linkMon.Close() e.router.Close() e.magicConn.Close()