return an infinite bandwidth if the RTT is zero

This commit is contained in:
Marten Seemann
2020-06-28 14:55:47 +07:00
parent fc047d7904
commit a20c5f8db0
3 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package congestion
import (
"math"
"time"
"github.com/lucas-clemente/quic-go/internal/protocol"
@@ -9,6 +10,8 @@ import (
// Bandwidth of a connection
type Bandwidth uint64
const infBandwidth Bandwidth = math.MaxUint64
const (
// BitsPerSecond is 1 bit per second
BitsPerSecond Bandwidth = 1