(session)
| 8621 | } |
| 8622 | __name(onHttp2RemoteSettings, "onHttp2RemoteSettings"); |
| 8623 | function onHttp2SendPing(session) { |
| 8624 | const state = session[kHTTP2SessionState]; |
| 8625 | if ((session.closed || session.destroyed) && state.ping.interval != null) { |
| 8626 | clearInterval(state.ping.interval); |
| 8627 | state.ping.interval = null; |
| 8628 | return; |
| 8629 | } |
| 8630 | session.ping(onPing.bind(session)); |
| 8631 | function onPing(err, duration) { |
| 8632 | const client = this[kClient]; |
| 8633 | const socket = this[kSocket]; |
| 8634 | if (err != null) { |
| 8635 | const error = new InformationalError(`HTTP/2: "PING" errored - type ${err.message}`); |
| 8636 | socket[kError] = error; |
| 8637 | client[kOnError](error); |
| 8638 | } else { |
| 8639 | client.emit("ping", duration); |
| 8640 | } |
| 8641 | } |
| 8642 | __name(onPing, "onPing"); |
| 8643 | } |
| 8644 | __name(onHttp2SendPing, "onHttp2SendPing"); |
| 8645 | function onHttp2SessionError(err) { |
| 8646 | assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); |
nothing calls this directly
no test coverage detected
searching dependent graphs…