[#879] Notify correct ChannelFuture for queued FileRegions

This commit is contained in:
Norman Maurer 2012-12-31 11:35:25 +01:00
parent 5aa679fec7
commit b49b3d9c56

View File

@ -422,13 +422,13 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
if (region == null) { if (region == null) {
// no region present means the next flush task was to directly flush // no region present means the next flush task was to directly flush
// the outbound buffer // the outbound buffer
flushNotifierAndFlush(future); flushNotifierAndFlush(next.future);
} else { } else {
// flush the region now // flush the region now
doFlushFileRegion(region, future); doFlushFileRegion(region, next.future);
} }
} catch (Throwable cause) { } catch (Throwable cause) {
future.setFailure(cause); next.future.setFailure(cause);
} }
} else { } else {
// notify the flush futures // notify the flush futures