forked from quic-go/quic-go
introduce a queue of active streams in the streamFramer
The queue holds all streams that have data to send. When stream.Write or stream.Close are called, a stream is added to this queue. It is removed from the queue when all available (at that moment) data was sent. This way, we don't need the round robin scheduling (which, for every packet sent, asked every single open stream if it had data) any more.
This commit is contained in:
@@ -140,7 +140,10 @@ var _ = Describe("Stream", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
close(writeReturned)
|
||||
}()
|
||||
Eventually(func() *wire.StreamFrame { return str.popStreamFrame(1000) }).ShouldNot(BeNil())
|
||||
Eventually(func() *wire.StreamFrame {
|
||||
frame, _ := str.popStreamFrame(1000)
|
||||
return frame
|
||||
}).ShouldNot(BeNil())
|
||||
Eventually(writeReturned).Should(BeClosed())
|
||||
mockSender.EXPECT().queueControlFrame(&wire.RstStreamFrame{
|
||||
StreamID: streamID,
|
||||
|
||||
Reference in New Issue
Block a user