wgengine/magicsock: remove unnecessary type assertions

Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
pull/1749/head
Josh Bleecher Snyder 2021-04-19 16:06:49 -07:00
parent 98714e784b
commit b1e624ef04
1 changed files with 2 additions and 2 deletions

View File

@ -2663,7 +2663,7 @@ func (c *Conn) Rebind() {
} else { } else {
c.logf("magicsock: link change rebound port from %d to %d", oldPort, c.port) c.logf("magicsock: link change rebound port from %d to %d", oldPort, c.port)
} }
c.pconn4.pconn = packetConn.(*net.UDPConn) c.pconn4.pconn = packetConn
c.pconn4.mu.Unlock() c.pconn4.mu.Unlock()
} else { } else {
c.logf("magicsock: link change, binding new port") c.logf("magicsock: link change, binding new port")
@ -2672,7 +2672,7 @@ func (c *Conn) Rebind() {
c.logf("magicsock: link change failed to bind new port: %v", err) c.logf("magicsock: link change failed to bind new port: %v", err)
return return
} }
c.pconn4.Reset(packetConn.(*net.UDPConn)) c.pconn4.Reset(packetConn)
} }
c.portMapper.SetLocalPort(c.LocalPort()) c.portMapper.SetLocalPort(c.LocalPort())