Do not write compressed SPDY frames out-of-band in another thread

This commit is contained in:
Jaen Saul 2012-08-20 21:39:28 +03:00
parent a93ada2031
commit 4e351f7399

View File

@ -159,12 +159,8 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
}
// Writes of compressed data must occur in order
final ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(frame, data);
e.getChannel().getPipeline().execute(new Runnable() {
public void run() {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
});
}
return;
} else if (msg instanceof SpdySynReplyFrame) {
@ -197,12 +193,8 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
}
// Writes of compressed data must occur in order
final ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(frame, data);
e.getChannel().getPipeline().execute(new Runnable() {
public void run() {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
});
}
return;
} else if (msg instanceof SpdyRstStreamFrame) {
@ -323,12 +315,8 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
}
// Writes of compressed data must occur in order
final ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(frame, data);
e.getChannel().getPipeline().execute(new Runnable() {
public void run() {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
});
}
return;
} else if (msg instanceof SpdyWindowUpdateFrame) {