From ddf6c8c72936045981b050043c30c4488f404656 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Thu, 27 May 2021 12:38:23 -0700 Subject: [PATCH] wgengine/magicsock: delete dead code Co-authored-by: Adrian Dewhurst Signed-off-by: Josh Bleecher Snyder --- wgengine/magicsock/magicsock.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 342bc19a0..051672202 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2869,26 +2869,6 @@ func (c *RebindingUDPConn) closeLocked() error { 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) { for { c.mu.Lock()