Avoid infinite loop in HTTP/2 distributor toString()
Motivation: Although effectively unused, the toString() of WeightedFairQueueByteDistributor.State is useful for debugging. It accidentally had an infinite loop, as it would recurse infinitely between a parent and its child, which makes it less useful for debugging. Modifications: Prune the infinite loop by using the parent's streamId instead of the parent's toString(). Result: Faster, less stack-overflowing toString()
This commit is contained in:
parent
7214740c06
commit
c6ad9338b3
@ -770,7 +770,7 @@ public final class WeightedFairQueueByteDistributor implements StreamByteDistrib
|
||||
.append(" flags ").append(flags)
|
||||
.append(" pseudoTimeQueue.size() ").append(pseudoTimeQueue.size())
|
||||
.append(" stateOnlyQueueIndex ").append(stateOnlyQueueIndex)
|
||||
.append(" parent ").append(parent).append("} [");
|
||||
.append(" parent.streamId ").append(parent == null ? -1 : parent.streamId).append("} [");
|
||||
|
||||
if (!pseudoTimeQueue.isEmpty()) {
|
||||
for (State s : pseudoTimeQueue) {
|
||||
|
Loading…
Reference in New Issue
Block a user