forked from quic-go/quic-go
@@ -323,6 +323,10 @@ func (s *Session) closeStreamsWithError(err error) {
|
||||
}
|
||||
|
||||
func (s *Session) sendPacket() error {
|
||||
if !s.congestionAllowsSending() {
|
||||
return nil
|
||||
}
|
||||
|
||||
var controlFrames []frames.Frame
|
||||
|
||||
// check for retransmissions first
|
||||
@@ -446,3 +450,7 @@ func (s *Session) scheduleSending() {
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Session) congestionAllowsSending() bool {
|
||||
return protocol.ByteCount(s.sentPacketHandler.BytesInFlight()) < 100*protocol.DefaultTCPMSS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user