@@ -44,7 +44,6 @@ const {
44
44
QuicSessionSharedState,
45
45
QLogStream,
46
46
} = require ( 'internal/quic/util' ) ;
47
- const util = require ( 'util' ) ;
48
47
const assert = require ( 'internal/assert' ) ;
49
48
const EventEmitter = require ( 'events' ) ;
50
49
const fs = require ( 'fs' ) ;
@@ -2713,23 +2712,17 @@ class QuicStream extends Duplex {
2713
2712
// TODO(@jasnell): Implement this
2714
2713
}
2715
2714
2716
- [ kInspect ] ( ) {
2715
+ [ kInspect ] ( depth , options ) {
2717
2716
// TODO(@jasnell): Proper custom inspect implementation
2718
2717
const direction = this . bidirectional ? 'bidirectional' : 'unidirectional' ;
2719
2718
const initiated = this . serverInitiated ? 'server' : 'client' ;
2720
- const obj = {
2719
+ return customInspect ( this , {
2721
2720
id : this [ kInternalState ] . id ,
2722
2721
direction,
2723
2722
initiated,
2724
2723
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 ) ;
2733
2726
}
2734
2727
2735
2728
[ kTrackWriteState ] ( stream , bytes ) {
0 commit comments