Docs: correct 'OnBufferedAmountLow' condition

This is in line with
* the docs for 'BufferedAmountLowThreshold' ("When the bufferedAmount
decreases from above this threshold to equal or below it")

* The actual code in 'pion/sctp':
d6446e3b0d/stream.go (L422)

* The Web WebRTC spec:
https://w3c.github.io/webrtc-pc/#event-datachannel-bufferedamountlow
This commit is contained in:
WofWca
2023-05-16 15:12:12 +04:00
committed by Sean DuBois
parent 045f9f69fa
commit 66f0c402c1
2 changed files with 2 additions and 2 deletions

View File

@@ -578,7 +578,7 @@ func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
}
// OnBufferedAmountLow sets an event handler which is invoked when
// the number of bytes of outgoing data becomes lower than the
// the number of bytes of outgoing data becomes lower than or equal to the
// BufferedAmountLowThreshold.
func (d *DataChannel) OnBufferedAmountLow(f func()) {
d.mu.Lock()

View File

@@ -246,7 +246,7 @@ func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
}
// OnBufferedAmountLow sets an event handler which is invoked when
// the number of bytes of outgoing data becomes lower than the
// the number of bytes of outgoing data becomes lower than or equal to the
// BufferedAmountLowThreshold.
func (d *DataChannel) OnBufferedAmountLow(f func()) {
if d.onBufferedAmountLow != nil {