Visitar URL original
Merge pull request #1114 from baranowb/UNDERTOW-1568 · undertow-io/undertow@c6569f4 · GitHub
Skip to content

Commit c6569f4

Browse files
authored
Merge pull request #1114 from baranowb/UNDERTOW-1568
[UNDERTOW-1568] - add sync block when handling frames in AbstractFram…
2 parents bec30b1 + 2508750 commit c6569f4

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎core/src/main/java/io/undertow/server/protocol/framed/AbstractFramedChannel.java‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,24 @@ public void addCloseTask(final ChannelListener<C> task) {
11081108

11091109
@Override
11101110
public String toString() {
1111-
return getClass().getSimpleName() + " peer " + channel.getPeerAddress() + " local " + channel.getLocalAddress() + "[ " + (receiver == null ? "No Receiver" : receiver.toString()) + " " + pendingFrames.toString() + " -- " + heldFrames.toString() + " -- " + newFrames.toString() + "]";
1111+
final StringBuilder stringBuilder = new StringBuilder(150);
1112+
stringBuilder.append(getClass().getSimpleName())
1113+
.append(" peer ")
1114+
.append(channel.getPeerAddress())
1115+
.append(" local ")
1116+
.append(channel.getLocalAddress())
1117+
.append("[ ");
1118+
synchronized (this) {
1119+
stringBuilder.append((receiver == null ? "No Receiver" : receiver.toString()))
1120+
.append(" ")
1121+
.append(pendingFrames.toString())
1122+
.append(" -- ")
1123+
.append(heldFrames.toString())
1124+
.append(" -- ")
1125+
.append(newFrames.toString());
1126+
}
1127+
1128+
return stringBuilder.toString();
11121129
}
11131130

11141131
protected StreamConnection getUnderlyingConnection() {

0 commit comments

Comments
 (0)