anchor.diff:  %% @end
   %%------------------------------------------------------------------------------
   send_request(#client_state{attempts = 0} = State) ->
  -    {reply, {error, connection_closed}, State#client_state{request = undefined}};
  +    {reply, {error, connection_closed}, State};
   send_request(#client_state{socket = undefined} = State) ->
       % if we dont get a keep alive from the previous request, the socket is undefined.
       case connect_socket(State) of
  
positive.code:             send_request(State#client_state{socket = undefined, attempts = Attempts - 1});
          {error, _Reason} ->
              lhttpc_sock:close(Socket, Ssl),
              {reply, {error, connection_closed}, State#client_state{socket = undefined,
                                                                     request = undefined}}
      end.
  
  %%------------------------------------------------------------------------------
  
negative.code: %%------------------------------------------------------------------------------
  %% @private
  %%------------------------------------------------------------------------------
  maybe_close_socket(#client_state{socket = Socket} = State, {1, 1}, ReqHdrs,
  		   RespHdrs) ->
      ClientConnection = case lists:keyfind(<<"connection">>, 1, ReqHdrs) of
  			   false ->
  			       false;
  