mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +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 {
|
||||
log.Printf("[conn %p] Registering writer for MAC %v is node %v", uc, srcMAC, srcNode.lanIP)
|
||||
srcNode.net.registerWriter(srcMAC, raddr, srcNode.interfaceID, writePkt)
|
||||
defer func() {
|
||||
srcNode.net.registerWriter(srcMAC, nil, 0, nil)
|
||||
}()
|
||||
defer srcNode.net.registerWriter(srcMAC, nil, 0, nil)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user