Fixed a race condition in HttpTunnelingServlet which caused data corruption and duplicate write
This commit is contained in:
parent
a28d08936d
commit
8ed89dbd8f
@ -240,8 +240,10 @@ public class HttpTunnelingServlet extends HttpServlet {
|
||||
@Override
|
||||
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
|
||||
ChannelBuffer buffer = (ChannelBuffer) e.getMessage();
|
||||
buffer.readBytes(out, buffer.readableBytes());
|
||||
out.flush();
|
||||
synchronized (this) {
|
||||
buffer.readBytes(out, buffer.readableBytes());
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user