[#2223] Need to make sure that the close() triggeres an upstream event in all cases

This commit is contained in:
Norman Maurer 2014-02-11 13:35:57 +01:00
parent 9a4f005e2a
commit 527347094a

View File

@ -101,6 +101,11 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler,
switch (evt.getState()) { switch (evt.getState()) {
case OPEN: case OPEN:
case BOUND: case BOUND:
if (evt.getValue() != Boolean.TRUE) {
ctx.sendUpstream(e);
return;
}
// Special case: OPEND and BOUND events are before CONNECTED, // Special case: OPEND and BOUND events are before CONNECTED,
// but CLOSED and UNBOUND events are after DISCONNECTED: should those events be blocked too? // but CLOSED and UNBOUND events are after DISCONNECTED: should those events be blocked too?
if (isBlocked(ctx) && !continues(ctx, evt)) { if (isBlocked(ctx) && !continues(ctx, evt)) {