Prevent possible ClassCastException

This commit is contained in:
Norman Maurer 2013-01-17 09:37:17 +01:00
parent 737a350854
commit 8a9e602a66
2 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ public class WebSocketServerProtocolHandler extends ChannelInboundMessageHandler
}
public WebSocketServerProtocolHandler(String websocketPath, String subprotocols, boolean allowExtensions) {
super(WebSocketFrame.class);
this.websocketPath = websocketPath;
this.subprotocols = subprotocols;
this.allowExtensions = allowExtensions;

View File

@ -44,6 +44,7 @@ public class WebSocketServerProtocolHandshakeHandler
public WebSocketServerProtocolHandshakeHandler(String websocketPath, String subprotocols,
boolean allowExtensions) {
super(FullHttpRequest.class);
this.websocketPath = websocketPath;
this.subprotocols = subprotocols;
this.allowExtensions = allowExtensions;