anchor.diff:  %% Handle async HTTP request replies.
   handle_info({http_reply, {_StatusAndReason, _Hdrs, Body}, Transport}, S) ->
       NS = handle_data(Body, S#state{requests = S#state.requests - 1}),
  -    NNS = case NS#state.requests == 0 of
  -        true ->
  +    NNS = case {NS#state.keepalive, NS#state.requests == 0} of
  +        {false, _} ->
  +            NS;
  +        {true, true} ->
               send(Transport, empty_body(NS#state.rid, NS#state.sid), NS);
  -        false ->
  +        {true, false} ->
               NS
       end,
       {noreply, NNS};
  
positive.code: get_sid(#transport{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_sid).
  
  %%%===================================================================
  %%% gen_server callbacks
  %%%===================================================================
  
negative.code: %% Low level API
  -export([send_raw/2,
           get_sid/1,
           get_rid/1,
           get_keepalive/1,
           set_keepalive/2]).
  
  -define(WAIT_FOR_SOCKET_CLOSE_TIMEOUT, 200).
  -define(SERVER, ?MODULE).
  