forked from quic-go/quic-go
replace stream.LenOfDataForWriting by HasDataForWriting
The return value (the length of data for writing) was only used to determine if the stream has data for writing. Therefore it's easier to just return a bool. No functional change expected.
This commit is contained in:
@@ -54,7 +54,7 @@ func (f *streamFramer) HasFramesForRetransmission() bool {
|
||||
}
|
||||
|
||||
func (f *streamFramer) HasCryptoStreamFrame() bool {
|
||||
return f.cryptoStream.LenOfDataForWriting() > 0
|
||||
return f.cryptoStream.HasDataForWriting()
|
||||
}
|
||||
|
||||
// TODO(lclemente): This is somewhat duplicate with the normal path for generating frames.
|
||||
@@ -116,7 +116,7 @@ func (f *streamFramer) maybePopNormalFrames(maxBytes protocol.ByteCount) (res []
|
||||
maxLen := maxBytes - currentLen - frameHeaderBytes
|
||||
|
||||
var data []byte
|
||||
if s.LenOfDataForWriting() > 0 {
|
||||
if s.HasDataForWriting() {
|
||||
data = s.GetDataForWriting(maxLen)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user