mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-07 18:31:49 +01:00
ipn/ipnlocal: remove an unnecessary unlock shortcut
The early unlock on this branch was required because the "send" method goes on to acquire the mutex itself. Rather than release the lock just to acquire it again, call the underlying locked helper directly. Updates #11649 Change-Id: I50d81864a00150fc41460b7486a9c65655f282f5 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
parent
2fb9472990
commit
9002e5fd6b
@ -1501,8 +1501,6 @@ func (b *LocalBackend) SetControlClientStatus(c controlclient.Client, st control
|
||||
return
|
||||
}
|
||||
if st.Err != nil {
|
||||
// The following do not depend on any data for which we need b locked.
|
||||
unlock.UnlockEarly()
|
||||
if errors.Is(st.Err, io.EOF) {
|
||||
b.logf("[v1] Received error: EOF")
|
||||
return
|
||||
@ -1511,7 +1509,7 @@ func (b *LocalBackend) SetControlClientStatus(c controlclient.Client, st control
|
||||
var uerr controlclient.UserVisibleError
|
||||
if errors.As(st.Err, &uerr) {
|
||||
s := uerr.UserVisibleError()
|
||||
b.send(ipn.Notify{ErrMessage: &s})
|
||||
b.sendToLocked(ipn.Notify{ErrMessage: &s}, allClients)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user