Skip to content

Commit

Permalink
Accept eof on json protocol.
Browse files Browse the repository at this point in the history
File transport still needs to be updated to send this. Then other
third-party transports like socketio and mochiweb need to send this
instead of 'EOF'.
  • Loading branch information
KenMacD committed Jan 16, 2012
1 parent eaa61d8 commit 1b702f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/erl/src/thrift_json_protocol.erl
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ read_all_1(Transport0, IoList) ->
{Transport1, iolist_to_binary(lists:reverse(IoList))};
{ok, Data} -> % character successfully read; read more
read_all_1(Transport1, [Data|IoList]);
{error, eof} ->
{Transport1, iolist_to_binary(lists:reverse(IoList))};
{error, 'EOF'} -> % we're done
{Transport1, iolist_to_binary(lists:reverse(IoList))}
end.
Expand Down

0 comments on commit 1b702f4

Please sign in to comment.