anchor.diff:  
   handle_info({tcp, Socket, Bs}, State) ->
       Res = recv(Socket, Bs),
  -    inet:setopts(Socket, [{active, once}]),
  -    {noreply, handle_response(Res, State)};
  -
  +    case Res of
  +        {recv_error, Cause} ->
  +            {stop, Cause, State};
  +        _Other ->
  +            inet:setopts(Socket, [{active, once}]),
  +            {noreply, handle_response(Res, State)}
  +    end;
   handle_info({tcp_error, _Socket, _Reason}, State) ->
       {noreply, State};
   
  
positive.code:                    end,
              recv_1(Len2, Rest4, Acc1);
          false ->
              {error, {invalid_data_length, Len, Type, Rest1}}
      end.
  
  
  
negative.code: recv_0(?BIN_ORG_TYPE_TUPLE, << Len:?BLEN_PARAM_TERM/integer, "\r\n", Rest/binary >>) ->
      recv_1(Len, Rest, []);
  recv_0(InvalidType, _Rest) ->
      {recv_error, {invalid_root_type, InvalidType}}.
  
  recv_1(_, <<"\r\n">>, Acc) ->
      list_to_tuple(Acc);
  