Discard the buffer if the protocol is unknown
This commit is contained in:
parent
6f2897a37b
commit
3f6c564090
@ -78,7 +78,8 @@ public class PortUnificationServerHandler extends FrameDecoder {
|
||||
} else if (isFactorial(magic1)) {
|
||||
switchToFactorial(ctx);
|
||||
} else {
|
||||
// Unknown protocol
|
||||
// Unknown protocol discard everything and close the connection.
|
||||
buffer.skipBytes(buffer.readableBytes());
|
||||
ctx.getChannel().close();
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user