mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove unused gonet.UDPConn.stack field.
Fixes #7894 PiperOrigin-RevId: 591533496
This commit is contained in:
@@ -546,17 +546,15 @@ func DialContextTCP(ctx context.Context, s *stack.Stack, addr tcpip.FullAddress,
|
||||
type UDPConn struct {
|
||||
deadlineTimer
|
||||
|
||||
stack *stack.Stack
|
||||
ep tcpip.Endpoint
|
||||
wq *waiter.Queue
|
||||
ep tcpip.Endpoint
|
||||
wq *waiter.Queue
|
||||
}
|
||||
|
||||
// NewUDPConn creates a new UDPConn.
|
||||
func NewUDPConn(s *stack.Stack, wq *waiter.Queue, ep tcpip.Endpoint) *UDPConn {
|
||||
func NewUDPConn(wq *waiter.Queue, ep tcpip.Endpoint) *UDPConn {
|
||||
c := &UDPConn{
|
||||
stack: s,
|
||||
ep: ep,
|
||||
wq: wq,
|
||||
ep: ep,
|
||||
wq: wq,
|
||||
}
|
||||
c.deadlineTimer.init()
|
||||
return c
|
||||
@@ -586,7 +584,7 @@ func DialUDP(s *stack.Stack, laddr, raddr *tcpip.FullAddress, network tcpip.Netw
|
||||
}
|
||||
}
|
||||
|
||||
c := NewUDPConn(s, &wq, ep)
|
||||
c := NewUDPConn(&wq, ep)
|
||||
|
||||
if raddr != nil {
|
||||
if err := c.ep.Connect(*raddr); err != nil {
|
||||
|
||||
@@ -489,7 +489,7 @@ func TestUDPForwarder(t *testing.T) {
|
||||
}
|
||||
defer ep.Close()
|
||||
|
||||
c := NewUDPConn(s, &wq, ep)
|
||||
c := NewUDPConn(&wq, ep)
|
||||
|
||||
buf := make([]byte, 256)
|
||||
n, e := c.Read(buf)
|
||||
|
||||
Reference in New Issue
Block a user