Skip to content

Commit

Permalink
fix(client): last CRLF is part of multi-line
Browse files Browse the repository at this point in the history
  • Loading branch information
sntran authored Feb 18, 2024
1 parent 949464e commit 9171a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen_nntp.erl
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ multiline(Socket, {ok, Acc}) ->
case gen_tcp:recv(Socket, 0, 1000) of
% End of the multi-line response.
{ok, <<".\r\n">>} ->
{ok, re:replace(Acc, "^\\s+|\\s+$", "", [{return, binary}, global])};
{ok, Acc};
{ok, Line} when is_binary(Line) ->
multiline(Socket, {ok, <<Acc/binary, Line/binary>>});
{error, Reason} ->
Expand Down

0 comments on commit 9171a65

Please sign in to comment.