Permalink
Browse files

Handle jsx 'incomplete' error.

  • Loading branch information...
1 parent 315c0d3 commit a424fab4336a6f1b283ceab2119956b5f79ec089 @KenMacD committed Jan 14, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/erl/src/thrift_json_protocol.erl
@@ -356,7 +356,10 @@ expect(#json_protocol{jsx={event, {Type, Data}=Ev, Next}}=State, ExpectedType) -
end;
expect(#json_protocol{jsx={event, Event, Next}}=State, ExpectedEvent) ->
- expect(State#json_protocol{jsx={event, {Event, none}, Next}}, ExpectedEvent).
+ expect(State#json_protocol{jsx={event, {Event, none}, Next}}, ExpectedEvent);
+
+expect(#json_protocol{jsx={incomplete, _Jsx}}=State, _ExpectedEvent) ->
+ {State, {error, eof}}.
convert_data(integer, I) -> list_to_integer(I);
convert_data(float, F) -> list_to_float(F);

0 comments on commit a424fab

Please sign in to comment.