wgengine: close in reverse order of bringup

Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
This commit is contained in:
Dmytro Shynkevych 2020-07-03 03:00:04 -04:00 committed by Dave Anderson
parent 7883e5c5e7
commit 16b2bbbbbb
1 changed files with 2 additions and 2 deletions

View File

@ -759,10 +759,10 @@ func (e *userspaceEngine) Close() {
r := bufio.NewReader(strings.NewReader(""))
e.wgdev.IpcSetOperation(r)
e.wgdev.Close()
e.magicConn.Close()
e.linkMon.Close()
e.router.Close()
e.magicConn.Close()
e.wgdev.Close()
// Shut down pingers after tundev is closed (by e.wgdev.Close) so the
// synchronous close does not get stuck on InjectOutbound.