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:     case WantSize of
          0 ->
              recv_0(Type, <<Rest/binary>>);
          RecvByte when RecvByte < 0 ->
              {recv_error, {invalid_data_length, RecvByte}};
          RecvByte ->
              case gen_tcp:recv(Socket, RecvByte, ?RECV_TIMEOUT) of
                  {ok, Rest2} ->
                      recv_0(Type, <<Rest/binary, Rest2/binary>>);
                  _ ->
                      {recv_error, {invalid_data_length, Size}}
              end
      end.
  
  