From 70eb05fd4730f5bca42f870961c94f57bf88b33b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 4 Feb 2021 11:18:32 -0800 Subject: [PATCH] wgengine: access flow pending problem with lock held Missed review feedback from just-submitted d37058af728c. --- wgengine/pendopen.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgengine/pendopen.go b/wgengine/pendopen.go index 3526fe9bc..f465f6542 100644 --- a/wgengine/pendopen.go +++ b/wgengine/pendopen.go @@ -132,10 +132,11 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) { return } delete(e.pendOpen, flow) + problem := of.problem e.mu.Unlock() - if !of.problem.IsZero() { - e.logf("open-conn-track: timeout opening %v; peer reported problem: %v", flow, of.problem) + if !problem.IsZero() { + e.logf("open-conn-track: timeout opening %v; peer reported problem: %v", flow, problem) } // Diagnose why it might've timed out.