anchor.diff:  
   
   %% @private
  --spec handle_resume(state(), pid(), non_neg_integer(), traverse_status()) -> state().
  -handle_resume(State, NewConn, ResumeOffset, TraverseStatus) ->
  +-spec wait_for_conn_upon_finish(state()) -> no_return().
  +wait_for_conn_upon_finish(State) ->
  +    #state{connection_pid = NewConn} = UpdatedState = wait_for_conn(State),
  +    NewConn ! ?MSG_DONE,
  +    wait_for_conn_upon_finish(UpdatedState).
  +
  +
  +%% @private
  +-spec handle_resume(state(), pid(), non_neg_integer()) -> state().
  +handle_resume(State, NewConn, ResumeOffset) ->
       UpdatedState = State#state{connection_pid = NewConn},
       case resend_unreceived_data(UpdatedState, ResumeOffset) of
  -        true -> TraverseStatus == finished andalso (NewConn ! ?MSG_DONE);
  +        true -> ok;
           false -> NewConn ! ?MSG_ERROR
       end,
       UpdatedState.
   
   
   %% @private
  --spec resend_unreceived_data(state(), non_neg_integer()) -> binary().
  +-spec resend_unreceived_data(state(), non_neg_integer()) -> boolean().
   resend_unreceived_data(State, ResumeOffset) ->
       #state{
           connection_pid = Conn, 
  
positive.code:         send_data(tar_utils:close_archive_stream(FinalTarStream), UpdatedState),
      tree_traverse_session:close_for_task(BulkDownloadId),
      Conn ! ?MSG_DONE,
      wait_for_conn(FinalState, finished). % do not die yet, last chunk might have failed
  
  
  %% @private
  
negative.code: }).
  
  -type state() :: #state{}.
  -type download_status() :: in_progress | finished.
  
  
  -define(TARBALL_DOWNLOAD_TRAVERSE_POOL_NAME, bulk_download_traverse:get_pool_name()).
  