anchor.diff:      case queue:out(State#state.keep_alive) of
   	{empty, _} ->
   	    ?hcrd("keep_alive queue empty", []),
  -	    %% The server may choose too terminate an idle keep_alive session
  -	    %% in this case we want to receive the close message
  -	    %% at once and not when trying to send the next
  -	    %% request.
  -	    activate_once(Session), 
  -	    %% If a keep_alive session has been idle for some time is not
  -	    %% closed by the server, the client may want to close it.
  -	    NewState = activate_queue_timeout(TimeOut, State),
  -	    update_session(ProfileName, Session, #session.queue_length, 0),
  -	    %% Note mfa will be initilized when a new request 
  -	    %% arrives.
  -	    {noreply, 
  -	     NewState#state{request     = undefined, 
  -			    mfa         = undefined,
  -			    status_line = undefined,
  -			    headers     = undefined,
  -			    body        = undefined
  -			   } 
  -	    };
  +	    handle_empty_queue(Session, ProfileName, TimeOut, State);
   	{{value, NextRequest}, KeepAlive} ->    
   	    ?hcrd("keep_alive queue non-empty", []),
   	    case lists:member(NextRequest#request.id, 
  
positive.code:             ?hcrd("request sent", []),
  
              %% Activate the request time out for the new request
              NewState =
                  activate_request_timeout(State#state{request = Request}),
  
              ClientClose =
                  httpc_request:is_client_closing(Request#request.headers),
  
              case State#state.request of
                  #request{} -> %% Old request not yet finished
                      ?hcrd("old request still not finished", []),
                      %% Make sure to use the new value of timers in state
                      NewTimers   = NewState#state.timers,
                      NewPipeline = queue:in(Request, State#state.pipeline),
                      NewSession  =
                          Session#session{queue_length =
                                          %% Queue + current
  
negative.code: 			Session#session{queue_length =
  					%% Queue + current
  					queue:len(Pipeline) + 1},
  		    receive_response(NextRequest,
  				     NewSession, Data,
  				     State#state{pipeline = Pipeline})
  	    end
      end.
  
  handle_keep_alive_queue(#state{status       = keep_alive,
  			       session      = Session,
  			       profile_name = ProfileName,
  			       options      = #options{keep_alive_timeout = TimeOut}} = State,
  			Data) ->
  
      ?hcrd("handle keep_alive", [{profile, ProfileName}, 
  				{session, Session},
  