[#1669] Correctly notify the ChannelPromise of delayed writes
This commit is contained in:
parent
5e703e7419
commit
0cb3541b53
@ -277,7 +277,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final ChannelHandlerContext ctx, final Object msg, ChannelPromise promise)
|
||||
public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise)
|
||||
throws Exception {
|
||||
long curtime = System.currentTimeMillis();
|
||||
long size = calculateSize(msg);
|
||||
@ -297,7 +297,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
||||
ctx.executor().schedule(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ctx.write(msg);
|
||||
ctx.write(msg, promise);
|
||||
}
|
||||
}, wait, TimeUnit.MILLISECONDS);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user