@@ -68,18 +68,18 @@ export async function select (stream: Duplex<any>, protocols: string | string[],
68
68
throw new Error ( 'At least one protocol must be specified' )
69
69
}
70
70
71
- log ( 'select: write ["%s", "%s"]' , PROTOCOL_ID , protocol )
71
+ log . trace ( 'select: write ["%s", "%s"]' , PROTOCOL_ID , protocol )
72
72
const p1 = uint8ArrayFromString ( PROTOCOL_ID )
73
73
const p2 = uint8ArrayFromString ( protocol )
74
74
multistream . writeAll ( writer , [ p1 , p2 ] , options )
75
75
76
76
let response = await multistream . readString ( reader , options )
77
- log ( 'select: read "%s"' , response )
77
+ log . trace ( 'select: read "%s"' , response )
78
78
79
79
// Read the protocol response if we got the protocolId in return
80
80
if ( response === PROTOCOL_ID ) {
81
81
response = await multistream . readString ( reader , options )
82
- log ( 'select: read "%s"' , response )
82
+ log . trace ( 'select: read "%s"' , response )
83
83
}
84
84
85
85
// We're done
@@ -90,10 +90,10 @@ export async function select (stream: Duplex<any>, protocols: string | string[],
90
90
91
91
// We haven't gotten a valid ack, try the other protocols
92
92
for ( const protocol of protocols ) {
93
- log ( 'select: write "%s"' , protocol )
93
+ log . trace ( 'select: write "%s"' , protocol )
94
94
multistream . write ( writer , uint8ArrayFromString ( protocol ) , options )
95
95
const response = await multistream . readString ( reader , options )
96
- log ( 'select: read "%s" for "%s"' , response , protocol )
96
+ log . trace ( 'select: read "%s" for "%s"' , response , protocol )
97
97
98
98
if ( response === protocol ) {
99
99
rest ( ) // End our writer so others can start writing to stream
0 commit comments