Adding synchronize for multi-threaded write concerns

This commit is contained in:
Joakim Erdfelt 2013-02-01 09:20:24 -07:00
parent 209d5bc12f
commit b810ce6535
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class FrameCompressionExtension extends AbstractExtension
private CompressionMethod method = new DeflateCompressionMethod(); private CompressionMethod method = new DeflateCompressionMethod();
@Override @Override
public void incomingFrame(Frame frame) public synchronized void incomingFrame(Frame frame)
{ {
if (frame.getType().isControl() || !frame.isRsv1()) if (frame.getType().isControl() || !frame.isRsv1())
{ {
@ -84,7 +84,7 @@ public class FrameCompressionExtension extends AbstractExtension
} }
@Override @Override
public void outgoingFrame(Frame frame, WriteCallback callback) public synchronized void outgoingFrame(Frame frame, WriteCallback callback)
{ {
if (frame.getType().isControl()) if (frame.getType().isControl())
{ {