Skip to content

Commit 66f0c40

Browse files
WofWcaSean-Der
authored andcommitted
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': https://github.com/pion/sctp/blob/d6446e3b0d0495d9974e68fec9b7fdb79c018ca1/stream.go#L422 * The Web WebRTC spec: https://w3c.github.io/webrtc-pc/#event-datachannel-bufferedamountlow
1 parent 045f9f6 commit 66f0c40

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datachannel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
578578
}
579579

580580
// OnBufferedAmountLow sets an event handler which is invoked when
581-
// the number of bytes of outgoing data becomes lower than the
581+
// the number of bytes of outgoing data becomes lower than or equal to the
582582
// BufferedAmountLowThreshold.
583583
func (d *DataChannel) OnBufferedAmountLow(f func()) {
584584
d.mu.Lock()

datachannel_js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
246246
}
247247

248248
// OnBufferedAmountLow sets an event handler which is invoked when
249-
// the number of bytes of outgoing data becomes lower than the
249+
// the number of bytes of outgoing data becomes lower than or equal to the
250250
// BufferedAmountLowThreshold.
251251
func (d *DataChannel) OnBufferedAmountLow(f func()) {
252252
if d.onBufferedAmountLow != nil {

0 commit comments

Comments
 (0)