@@ -44,7 +44,6 @@ const {
4444 QuicSessionSharedState,
4545 QLogStream,
4646} = require ( 'internal/quic/util' ) ;
47- const util = require ( 'util' ) ;
4847const assert = require ( 'internal/assert' ) ;
4948const EventEmitter = require ( 'events' ) ;
5049const fs = require ( 'fs' ) ;
@@ -2713,23 +2712,17 @@ class QuicStream extends Duplex {
27132712 // TODO(@jasnell): Implement this
27142713 }
27152714
2716- [ kInspect ] ( ) {
2715+ [ kInspect ] ( depth , options ) {
27172716 // TODO(@jasnell): Proper custom inspect implementation
27182717 const direction = this . bidirectional ? 'bidirectional' : 'unidirectional' ;
27192718 const initiated = this . serverInitiated ? 'server' : 'client' ;
2720- const obj = {
2719+ return customInspect ( this , {
27212720 id : this [ kInternalState ] . id ,
27222721 direction,
27232722 initiated,
27242723 writableState : this . _writableState ,
2725- readableState : this . _readableState ,
2726- stats : {
2727- dataRate : this . dataRateHistogram ,
2728- dataSize : this . dataSizeHistogram ,
2729- dataAck : this . dataAckHistogram ,
2730- }
2731- } ;
2732- return `QuicStream ${ util . format ( obj ) } ` ;
2724+ readableState : this . _readableState
2725+ } , depth , options ) ;
27332726 }
27342727
27352728 [ kTrackWriteState ] ( stream , bytes ) {
0 commit comments