Fix typo and remove thrown exception.

This commit is contained in:
Ryley Kimmel
2015-02-27 14:26:04 -05:00
parent f059d8da03
commit 39ccf3ae2b
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -72,15 +72,15 @@ public final class ApolloHandler extends ChannelInboundHandlerAdapter {
Session session = attr.get();
if (message instanceof HttpRequest || message instanceof JagGrabRequest) {
session = new UpdateSession(ctx.channel(), serverContext);
}
if (session != null) {
session.messageReceived(message);
return;
}
if (message instanceof HttpRequest || message instanceof JagGrabRequest) {
session = new UpdateSession(ctx.channel(), serverContext);
}
// TODO: Perhaps let HandshakeMessage implement Message to remove this explicit check
if (message instanceof HandshakeMessage) {
HandshakeMessage handshakeMessage = (HandshakeMessage) message;
@@ -26,7 +26,7 @@ public final class HandshakeDecoder extends ByteToMessageDecoder {
private static final Logger logger = Logger.getLogger(HandshakeDecoder.class.getName());
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception {
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) {
if (!buffer.isReadable()) {
return;
}
@@ -49,7 +49,7 @@ public final class HandshakeDecoder extends ByteToMessageDecoder {
default:
ByteBuf data = buffer.readBytes(buffer.readableBytes());
logger.info(String.format("Unecpected handshake request received: %d data: %s", id, data.toString()));
logger.info(String.format("Unexpected handshake request received: %d data: %s", id, data.toString()));
return;
}