You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2017/09/22 12:31:29 UTC
thrift git commit: THRIFT-4340: Fix a crash on client close Client:
erl
Repository: thrift
Updated Branches:
refs/heads/master 28eb9d98e -> 2d8b17890
THRIFT-4340: Fix a crash on client close
Client: erl
This closes #1367
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/2d8b1789
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/2d8b1789
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/2d8b1789
Branch: refs/heads/master
Commit: 2d8b17890cf67032e9cb0da21eea940a265261ff
Parents: 28eb9d9
Author: Anthony Molinaro <an...@alumni.caltech.edu>
Authored: Thu Sep 21 23:13:33 2017 +0000
Committer: James E. King, III <jk...@apache.org>
Committed: Fri Sep 22 05:30:22 2017 -0700
----------------------------------------------------------------------
lib/erl/src/thrift_framed_transport.erl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/2d8b1789/lib/erl/src/thrift_framed_transport.erl
----------------------------------------------------------------------
diff --git a/lib/erl/src/thrift_framed_transport.erl b/lib/erl/src/thrift_framed_transport.erl
index 715f090..9a5d6af 100644
--- a/lib/erl/src/thrift_framed_transport.erl
+++ b/lib/erl/src/thrift_framed_transport.erl
@@ -62,7 +62,8 @@ when is_integer(Len), Len >= 0 ->
Give = min(iolist_size(NewBinary), Len),
{Result, Remaining} = split_binary(NewBinary, Give),
{State#t_framed{wrapped = NewState, read_buffer = Remaining}, {ok, Result}};
- Error -> Error
+ {NewState, Error} ->
+ {State#t_framed{wrapped = NewState}, Error}
end;
%% read of zero bytes
<<>> -> {State, {ok, <<>>}};