diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index 2c3ab4b888ef41..f23894b7ec60ab 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -1777,10 +1777,9 @@ class QuicSession extends EventEmitter { stream[kStreamReset](code); } - [kInspect]() { - // TODO(@jasnell): A proper custom inspect implementation + [kInspect](depth, options) { const state = this[kInternalState]; - const obj = { + return customInspect(this, { alpn: state.alpn, cipher: this.cipher, closing: this.closing, @@ -1790,12 +1789,7 @@ class QuicSession extends EventEmitter { maxStreams: this.maxStreams, servername: this.servername, streams: state.streams.size, - stats: { - handshakeAck: this.handshakeAckHistogram, - handshakeContinuation: this.handshakeContinuationHistogram, - } - }; - return `${this.constructor.name} ${util.format(obj)}`; + }, depth, options); } [kSetSocket](socket) {