Skip to content

Commit eaf8ac7

Browse files
authored
fix: upgrader error msg to show current/max (#2491)
Provides more information in the error message so users can better understand the error state.
1 parent acef726 commit eaf8ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/libp2p/src/upgrader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export class DefaultUpgrader implements Upgrader {
471471
const streamCount = countStreams(protocol, 'outbound', connection)
472472

473473
if (streamCount >= outgoingLimit) {
474-
const err = new CodeError(`Too many outbound protocol streams for protocol "${protocol}" - limit ${outgoingLimit}`, codes.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS)
474+
const err = new CodeError(`Too many outbound protocol streams for protocol "${protocol}" - ${streamCount}/${outgoingLimit}`, codes.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS)
475475
muxedStream.abort(err)
476476

477477
throw err

0 commit comments

Comments
 (0)