forked from quic-go/quic-go
http3: keep datagram receive loop running on datagram for unknown stream (#5136)
This commit is contained in:
@@ -308,11 +308,10 @@ func (c *connection) receiveDatagrams() error {
|
||||
streamID := protocol.StreamID(4 * quarterStreamID)
|
||||
c.streamMx.Lock()
|
||||
dg, ok := c.streams[streamID]
|
||||
if !ok {
|
||||
c.streamMx.Unlock()
|
||||
return nil
|
||||
}
|
||||
c.streamMx.Unlock()
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
dg.enqueue(b[n:])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,7 @@ var _ = Describe("Connection", func() {
|
||||
close(delivered)
|
||||
return b, nil
|
||||
})
|
||||
qconn.EXPECT().ReceiveDatagram(gomock.Any()).Return(nil, errors.New("test done"))
|
||||
go func() {
|
||||
defer GinkgoRecover()
|
||||
conn.handleUnidirectionalStreams(nil)
|
||||
|
||||
Reference in New Issue
Block a user