(id, type, code)
| 661 | // Called by the native layer when an error has occurred sending a |
| 662 | // frame. This should be exceedingly rare. |
| 663 | function onFrameError(id, type, code) { |
| 664 | const session = this[kOwner]; |
| 665 | if (session.destroyed) |
| 666 | return; |
| 667 | debugSessionObj(session, 'error sending frame type %d on stream %d, code: %d', |
| 668 | type, id, code); |
| 669 | |
| 670 | const stream = session[kState].streams.get(id); |
| 671 | const emitter = stream || session; |
| 672 | emitter[kUpdateTimer](); |
| 673 | emitter.emit('frameError', type, code, id); |
| 674 | |
| 675 | // When a frameError happens is not uncommon that a pending GOAWAY |
| 676 | // package from nghttp2 is on flight with a correct error code. |
| 677 | // We schedule it using setImmediate to give some time for that |
| 678 | // package to arrive. |
| 679 | setImmediate(() => { |
| 680 | stream?.close(code); |
| 681 | session.close(); |
| 682 | }); |
| 683 | } |
| 684 | |
| 685 | function onAltSvc(stream, origin, alt) { |
| 686 | const session = this[kOwner]; |
nothing calls this directly
no test coverage detected
searching dependent graphs…