mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 16:17:41 +00:00
tstest/natlab: simplify a defer
Updates #13038 Change-Id: I4d38701491523c64c81767b0838010609e683a9f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
cccacff564
commit
e0bdd5d058
@ -832,9 +832,7 @@ func (s *Server) ServeUnixConn(uc *net.UnixConn, proto Protocol) {
|
|||||||
if _, ok := srcNode.net.writers.Load(srcMAC); !ok {
|
if _, ok := srcNode.net.writers.Load(srcMAC); !ok {
|
||||||
log.Printf("[conn %p] Registering writer for MAC %v is node %v", uc, srcMAC, srcNode.lanIP)
|
log.Printf("[conn %p] Registering writer for MAC %v is node %v", uc, srcMAC, srcNode.lanIP)
|
||||||
srcNode.net.registerWriter(srcMAC, raddr, srcNode.interfaceID, writePkt)
|
srcNode.net.registerWriter(srcMAC, raddr, srcNode.interfaceID, writePkt)
|
||||||
defer func() {
|
defer srcNode.net.registerWriter(srcMAC, nil, 0, nil)
|
||||||
srcNode.net.registerWriter(srcMAC, nil, 0, nil)
|
|
||||||
}()
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user