From ac9cd48c80e5517bd90f26f7dfd0375f852e42ed Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 30 Apr 2021 09:14:56 -0400 Subject: [PATCH] ipnlocal: fix deadlock when calling Shutdown() from Start(). Signed-off-by: Avery Pennarun --- ipn/ipnlocal/local.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index e2b6cb22b..773e09043 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -682,7 +682,9 @@ func (b *LocalBackend) Start(opts ipn.Options) error { // into sync with the minimal changes. But that's not how it // is right now, which is a sign that the code is still too // complicated. + b.mu.Unlock() b.cc.Shutdown() + b.mu.Lock() } httpTestClient := b.httpTestClient