mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
remove the error return value from Stream.CancelRead
This commit is contained in:
parent
3808191679
commit
ca939df44e
7 changed files with 22 additions and 27 deletions
|
@ -82,7 +82,7 @@ var _ = Describe("Stream Cancelations", func() {
|
|||
// cancel around 2/3 of the streams
|
||||
if rand.Int31()%3 != 0 {
|
||||
atomic.AddInt32(&canceledCounter, 1)
|
||||
Expect(str.CancelRead(quic.ErrorCode(str.StreamID()))).To(Succeed())
|
||||
str.CancelRead(quic.ErrorCode(str.StreamID()))
|
||||
return
|
||||
}
|
||||
data, err := ioutil.ReadAll(str)
|
||||
|
@ -128,7 +128,7 @@ var _ = Describe("Stream Cancelations", func() {
|
|||
length := int(rand.Int31n(int32(len(testserver.PRData) - 1)))
|
||||
data, err := ioutil.ReadAll(io.LimitReader(str, int64(length)))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(str.CancelRead(quic.ErrorCode(str.StreamID()))).To(Succeed())
|
||||
str.CancelRead(quic.ErrorCode(str.StreamID()))
|
||||
Expect(data).To(Equal(testserver.PRData[:length]))
|
||||
atomic.AddInt32(&canceledCounter, 1)
|
||||
return
|
||||
|
@ -309,7 +309,7 @@ var _ = Describe("Stream Cancelations", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
// cancel around half of the streams
|
||||
if rand.Int31()%2 == 0 {
|
||||
Expect(str.CancelRead(quic.ErrorCode(str.StreamID()))).To(Succeed())
|
||||
str.CancelRead(quic.ErrorCode(str.StreamID()))
|
||||
return
|
||||
}
|
||||
data, err := ioutil.ReadAll(str)
|
||||
|
@ -401,7 +401,7 @@ var _ = Describe("Stream Cancelations", func() {
|
|||
}
|
||||
Expect(data).To(Equal(testserver.PRData[:length]))
|
||||
if length < len(testserver.PRData) {
|
||||
Expect(str.CancelRead(quic.ErrorCode(str.StreamID()))).To(Succeed())
|
||||
str.CancelRead(quic.ErrorCode(str.StreamID()))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue