Skip to content

Commit

Permalink
Merge pull request #1114 from baranowb/UNDERTOW-1568
Browse files Browse the repository at this point in the history
[UNDERTOW-1568] - add sync block when handling frames in AbstractFram…
  • Loading branch information
fl4via authored Sep 28, 2021
2 parents bec30b1 + 2508750 commit c6569f4
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,24 @@ public void addCloseTask(final ChannelListener<C> task) {

@Override
public String toString() {
return getClass().getSimpleName() + " peer " + channel.getPeerAddress() + " local " + channel.getLocalAddress() + "[ " + (receiver == null ? "No Receiver" : receiver.toString()) + " " + pendingFrames.toString() + " -- " + heldFrames.toString() + " -- " + newFrames.toString() + "]";
final StringBuilder stringBuilder = new StringBuilder(150);
stringBuilder.append(getClass().getSimpleName())
.append(" peer ")
.append(channel.getPeerAddress())
.append(" local ")
.append(channel.getLocalAddress())
.append("[ ");
synchronized (this) {
stringBuilder.append((receiver == null ? "No Receiver" : receiver.toString()))
.append(" ")
.append(pendingFrames.toString())
.append(" -- ")
.append(heldFrames.toString())
.append(" -- ")
.append(newFrames.toString());
}

return stringBuilder.toString();
}

protected StreamConnection getUnderlyingConnection() {
Expand Down

0 comments on commit c6569f4

Please sign in to comment.