Skip to content
Browse files

fixed get_data loop

  • Loading branch information...
1 parent 34b58d8 commit c3ac087fab771ab2ac05a93b9dc4965979cf0933 zeusfaber committed Jan 20, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/merle.erl
View
4 src/merle.erl
@@ -332,7 +332,6 @@ recv_complex_reply(Socket) ->
%% @private
%% @doc recieve loop to get all data
-%% @todo
get_data(Socket, Bin, Bytes, Len) when Len < Bytes + 7->
receive
{tcp, Socket, Data} ->
@@ -342,5 +341,6 @@ get_data(Socket, Bin, Bytes, Len) when Len < Bytes + 7->
connection_closed
after ?TIMEOUT -> timeout
end;
-get_data(_, Bin, _, _) ->
+get_data(_, Data, Bytes, _) ->
+ <<Bin:Bytes/binary, "\r\nEND\r\n">> = Data,
binary_to_term(Bin).

0 comments on commit c3ac087

Please sign in to comment.
Something went wrong with that request. Please try again.