From 86baf60bd4662abbf96da4cb34f012f4f914740a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 10 Mar 2020 17:29:45 -0700 Subject: [PATCH] wgengine/magicsock: synchronize epUpdate cleanup on shutdown. Signed-off-by: David Anderson --- wgengine/magicsock/magicsock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 50160c877..fd0b091d1 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -256,6 +256,7 @@ func (c *Conn) epUpdate(ctx context.Context) { case <-ctx.Done(): if lastCancel != nil { lastCancel() + <-lastDone } return case <-c.startEpUpdate: