mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove useless endpoint construction
PiperOrigin-RevId: 333591566
This commit is contained in:
committed by
gVisor bot
parent
832d91b805
commit
ada4d8a337
@@ -1516,18 +1516,6 @@ func TestSetTTL(t *testing.T) {
|
||||
c.t.Fatalf("SetSockOptInt(TTLOption, %d) failed: %s", wantTTL, err)
|
||||
}
|
||||
|
||||
var p stack.NetworkProtocol
|
||||
if flow.isV4() {
|
||||
p = ipv4.NewProtocol()
|
||||
} else {
|
||||
p = ipv6.NewProtocol()
|
||||
}
|
||||
ep := p.NewEndpoint(0, nil, nil, nil, nil, stack.New(stack.Options{
|
||||
NetworkProtocols: []stack.NetworkProtocol{ipv4.NewProtocol(), ipv6.NewProtocol()},
|
||||
TransportProtocols: []stack.TransportProtocol{udp.NewProtocol()},
|
||||
}))
|
||||
ep.Close()
|
||||
|
||||
testWrite(c, flow, checker.TTL(wantTTL))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user