Permalink
Browse files

fix proto_ws hybi-10_17 multiple frames in one packet problem

  • Loading branch information...
1 parent 4e35f59 commit d62c4af45aea9ef9300fbb0f60704d23a50e7755 @gleber committed Jun 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/proto_ws_draft-hybi-10_17.erl
@@ -251,8 +251,8 @@ i_handle_data(#wstate{buffer=ToParse} = State, Acc0, WsCallback) ->
State#wstate{buffer = Rest},
Acc0, WsCallback) of
%% tail-call if there is stuff in the buffer still to parse
- NewState = #wstate{buffer = B} when is_binary(B), B =/= <<>> ->
- i_handle_data(NewState, Acc0, WsCallback);
+ {Acc2, continue, NewState = #wstate{buffer = B}} when is_binary(B), B =/= <<>> ->
+ i_handle_data(NewState, Acc2, WsCallback);
Other ->
Other
end;

0 comments on commit d62c4af

Please sign in to comment.