Skip to content

Commit 4aab543

Browse files
committed
Revert "Removed synchronized from write method"
This reverts commit e8da70d.
1 parent e8da70d commit 4aab543

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/javawebstack/httpserver/util/websocket/WebSocketFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public WebSocketFrame setPayload(byte[] payload) {
7474
return this;
7575
}
7676

77-
public void write(OutputStream stream) throws IOException {
77+
public synchronized void write(OutputStream stream) throws IOException {
7878
stream.write(flags | opcode);
7979
int lengthByte = payload.length > 125 ? (payload.length > 0xFFFF ? 127 : 126) : payload.length;
8080
stream.write((maskKey != null ? 0b1000_0000 : 0) | lengthByte);

0 commit comments

Comments
 (0)