Skip to content

Commit

Permalink
fix: upgrader error msg to show current/max (#2491)
Browse files Browse the repository at this point in the history
Provides more information in the error message so users can better understand the error state.
  • Loading branch information
SgtPooki authored Apr 22, 2024
1 parent acef726 commit eaf8ac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libp2p/src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class DefaultUpgrader implements Upgrader {
const streamCount = countStreams(protocol, 'outbound', connection)

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

throw err
Expand Down

0 comments on commit eaf8ac7

Please sign in to comment.