anchor.diff:  % on the ibrowse_req_id format. This just drops all
   % messages for the given ReqId on the floor since we're
   % no longer in the HTTP request.
  -clean_mailbox({ibrowse_req_id, ReqId}) ->
  +
  +clean_mailbox(ReqId) ->
  +    clean_mailbox(ReqId, ?MAX_DISCARDED_MESSAGES).
  +
  +
  +clean_mailbox(_ReqId, 0) ->
  +    case get(?STREAM_STATUS) of
  +        {streaming, Worker} ->
  +            % We kill workers that continue to stream us
  +            % messages after we give up but do *not* exit
  +            % our selves. This is because we may be running
  +            % as an exception unwinds and we don't want to
  +            % change any of that subtle logic.
  +            exit(Worker, {timeout, ibrowse_stream_cleanup});
  +        _ ->
  +            ok
  +    end,
  +    ok;
  +clean_mailbox({ibrowse_req_id, ReqId}, Count) when Count > 0 ->
       case get(?STREAM_STATUS) of
           streaming ->
               ibrowse:stream_next(ReqId),
               receive
                   {ibrowse_async_response, ReqId, _} ->
  -                    clean_mailbox({ibrowse_req_id, ReqId});
  +                    clean_mailbox({ibrowse_req_id, ReqId}, Count - 1);
                   {ibrowse_async_response_end, ReqId} ->
                       put(?STREAM_STATUS, ended),
                       ok
  
positive.code: -define(replace(L, K, V), lists:keystore(K, 1, L, {K, V})).
  -define(MAX_WAIT, 5 * 60 * 1000).
  -define(STREAM_STATUS, ibrowse_stream_status).
  
  
  setup(#httpdb{httpc_pool = nil, url = Url, http_connections = MaxConns} = Db) ->
  
negative.code:         Status when Status == init; Status == ended ->
              receive
                  {ibrowse_async_response, ReqId, _} ->
                      clean_mailbox({ibrowse_req_id, ReqId}, Count - 1);
                  {ibrowse_async_response_end, ReqId} ->
                      put(?STREAM_STATUS, ended),
                      ok
  