diff --git a/integrationtests/self/stateless_reset_test.go b/integrationtests/self/stateless_reset_test.go index a8e1fe43..3fbd404a 100644 --- a/integrationtests/self/stateless_reset_test.go +++ b/integrationtests/self/stateless_reset_test.go @@ -92,12 +92,13 @@ var _ = Describe("Stateless Resets", func() { close(acceptStopped) }() - // trigger something (not too small) to be sent, - // so that we receive the stateless reset - _, err = str.Write([]byte("Lorem ipsum dolor sit amet.")) - Expect(err).ToNot(HaveOccurred()) - _, err = str.Read([]byte{0}) - Expect(err).To(MatchError("INTERNAL_ERROR: received a stateless reset")) + // Trigger something (not too small) to be sent, so that we receive the stateless reset. + // If the client already sent another packet, it might already have received a packet. + _, serr := str.Write([]byte("Lorem ipsum dolor sit amet.")) + if serr == nil { + _, serr = str.Read([]byte{0}) + } + Expect(serr).To(MatchError("INTERNAL_ERROR: received a stateless reset")) Expect(ln2.Close()).To(Succeed()) Eventually(acceptStopped).Should(BeClosed())