()
| 380 | } |
| 381 | |
| 382 | _needsNegotiation () { |
| 383 | this._debug('_needsNegotiation') |
| 384 | if (this._batchedNegotiation) return // batch synchronous renegotiations |
| 385 | this._batchedNegotiation = true |
| 386 | queueMicrotask(() => { |
| 387 | this._batchedNegotiation = false |
| 388 | if (this.initiator || !this._firstNegotiation) { |
| 389 | this._debug('starting batched negotiation') |
| 390 | this.negotiate() |
| 391 | } else { |
| 392 | this._debug('non-initiator initial negotiation request discarded') |
| 393 | } |
| 394 | this._firstNegotiation = false |
| 395 | }) |
| 396 | } |
| 397 | |
| 398 | negotiate () { |
| 399 | if (this.destroying) return |
no test coverage detected