diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index 0b0629d37745e0..2c3ab4b888ef41 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -977,14 +977,18 @@ class QuicSocket extends EventEmitter { } } - [kInspect]() { - // TODO(@jasnell): Proper custom inspect implementation - const state = this[kInternalState]; - const obj = { + [kInspect](depth, options) { + return customInspect(this, { endpoints: this.endpoints, - sessions: state.sessions, - }; - return `QuicSocket ${util.format(obj)}`; + sessions: this.sessions, + bound: this.bound, + pending: this.pending, + closing: this.closing, + destroyed: this.destroyed, + listening: this.listening, + serverBusy: this.serverBusy, + statelessResetDisabled: this.statelessResetDisabled, + }, depth, options); } [kAddSession](session) {