forked from quic-go/quic-go
don't report blocked streams as active for sending data
This commit is contained in:
@@ -109,6 +109,15 @@ func (c *streamFlowController) SendWindowSize() protocol.ByteCount {
|
||||
return window
|
||||
}
|
||||
|
||||
// IsBlocked says if it is blocked by stream-level flow control.
|
||||
// If it is blocked, the offset is returned.
|
||||
func (c *streamFlowController) IsBlocked() (bool, protocol.ByteCount) {
|
||||
if c.sendWindowSize() != 0 {
|
||||
return false, 0
|
||||
}
|
||||
return true, c.sendWindow
|
||||
}
|
||||
|
||||
func (c *streamFlowController) HasWindowUpdate() bool {
|
||||
c.mutex.Lock()
|
||||
hasWindowUpdate := !c.receivedFinalOffset && c.hasWindowUpdate()
|
||||
|
||||
Reference in New Issue
Block a user