()
| 3577 | } |
| 3578 | |
| 3579 | function socketOnClose() { |
| 3580 | const session = this[kBoundSession]; |
| 3581 | if (session !== undefined) { |
| 3582 | debugSessionObj(session, 'socket closed'); |
| 3583 | const err = session.connecting ? new ERR_SOCKET_CLOSED() : null; |
| 3584 | const state = session[kState]; |
| 3585 | state.streams.forEach((stream) => stream.close(NGHTTP2_CANCEL)); |
| 3586 | state.pendingStreams.forEach((stream) => stream.close(NGHTTP2_CANCEL)); |
| 3587 | session.close(); |
| 3588 | closeSession(session, NGHTTP2_NO_ERROR, err); |
| 3589 | } |
| 3590 | } |
| 3591 | |
| 3592 | function connect(authority, options, listener) { |
| 3593 | if (typeof options === 'function') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…