Skip to content

Commit

Permalink
qos heart question fix apache#3165
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyHZM committed Jan 8, 2019
1 parent 2cbc83f commit fad88db
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) t
}
}

@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
ScheduledFuture<?> future = welcomeFuture;
if(future != null && !future.isCancelled()){
future.cancel(true);
}
ctx.close();
}

// G for GET, and P for POST
private static boolean isHttp(int magic) {
return magic == 'G' || magic == 'P';
Expand Down

0 comments on commit fad88db

Please sign in to comment.