Skip to content

Commit

Permalink
Make sure setHandshakeComplete() is called before the handler is repl…
Browse files Browse the repository at this point in the history
…aced. See #332
  • Loading branch information
normanmaurer committed May 18, 2012
1 parent 288ed13 commit 17cdc98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ public void finishHandshake(Channel channel, HttpResponse response) throws WebSo
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
setActualSubprotocol(subprotocol);

setHandshakeComplete();

channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket00FrameDecoder(getMaxFramePayloadLength()));

setHandshakeComplete();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ public void finishHandshake(Channel channel, HttpResponse response) {
setActualSubprotocol(subprotocol);


setHandshakeComplete();

channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket08FrameDecoder(false, allowExtensions, this.getMaxFramePayloadLength()));

setHandshakeComplete();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ public void finishHandshake(Channel channel, HttpResponse response) throws WebSo
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
setActualSubprotocol(subprotocol);


setHandshakeComplete();

channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket13FrameDecoder(false, allowExtensions, this.getMaxFramePayloadLength()));

setHandshakeComplete();

}
}

0 comments on commit 17cdc98

Please sign in to comment.