mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 18:51:18 -08:00
client/web: fix lock/unlock order when updating s.self
Updates tailscale/corp#13775 Signed-off-by: Sonia Appasamy <[email protected]>
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -160,10 +160,10 @@ func (s *Server) watchSelf(ctx context.Context) {
|
||||
// updateSelf grabs the lock and updates s.self.
|
||||
// Then logs if anything changed.
|
||||
func (s *Server) updateSelf(self tailcfg.NodeView) {
|
||||
s.selfMu.Lock()
|
||||
s.selfMu.Unlock()
|
||||
prev := s.self
|
||||
s.self = self
|
||||
s.selfMu.Unlock()
|
||||
s.selfMu.Lock()
|
||||
|
||||
var old, new tailcfg.StableNodeID
|
||||
if prev.Valid() {
|
||||
|
||||
Reference in new issue
Block a user