pass around receivedPacket as struct instead of as pointer (#3823)

This commit is contained in:
Marten Seemann
2023-06-03 10:08:58 +03:00
committed by GitHub
parent 591ab1ab5e
commit 072a602cc1
16 changed files with 96 additions and 94 deletions

View File

@@ -27,7 +27,7 @@ var _ = Describe("Closed local connection", func() {
)
addr := &net.UDPAddr{IP: net.IPv4(127, 1, 2, 3), Port: 1337}
for i := 1; i <= 20; i++ {
conn.handlePacket(&receivedPacket{remoteAddr: addr})
conn.handlePacket(receivedPacket{remoteAddr: addr})
if i == 1 || i == 2 || i == 4 || i == 8 || i == 16 {
Expect(written).To(Receive(Equal(addr))) // receive the CONNECTION_CLOSE
} else {