wgengine/magicsock: delete dead code

Co-authored-by: Adrian Dewhurst <adrian@tailscale.com>
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
pull/2012/head
Josh Bleecher Snyder 4 years ago committed by Josh Bleecher Snyder
parent 4cfaf489ac
commit ddf6c8c729

@ -2869,26 +2869,6 @@ func (c *RebindingUDPConn) closeLocked() error {
return c.pconn.Close() return c.pconn.Close()
} }
func (c *RebindingUDPConn) WriteToUDP(b []byte, addr *net.UDPAddr) (int, error) {
for {
c.mu.Lock()
pconn := c.pconn
c.mu.Unlock()
n, err := pconn.WriteTo(b, addr)
if err != nil {
c.mu.Lock()
pconn2 := c.pconn
c.mu.Unlock()
if pconn != pconn2 {
continue
}
}
return n, err
}
}
func (c *RebindingUDPConn) WriteTo(b []byte, addr net.Addr) (int, error) { func (c *RebindingUDPConn) WriteTo(b []byte, addr net.Addr) (int, error) {
for { for {
c.mu.Lock() c.mu.Lock()

Loading…
Cancel
Save