title: RxJava 2 Observable with flatMapCompletable doesn't complete
body: <p>I have an observable that emits items and upload them to server.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>repository
              .getItems()
              .doOnComplete(() -&gt; Log.d(TAG, "No items left."))
              .flatMapCompletable(item -&gt;
                      repository
                              .uploadItems(item)
                              .onErrorComplete()
                              .andThen(
                                      deleteTemporaryItem()
                                              .onErrorComplete()
                              )
              );
  </code></pre>
  
  <p>getItems method emits items one by one and then completes, uploadItems method upload them to server. The issue is when there is no items all chain onComplete event just working fine and all my subscribers get this event and proceed it BUT when there were some items and all of them were uploaded onComplete events doesn't go further than  .doOnComplete(() -> Log.d(TAG, "No items left.")) method and all subscribers doesn't get this event. I added onErrorComplete to be sure that all methods after uploadItems completes and I also see in logs that all of them were completed but onComplete event from repository.getItems() doesn't go to all subscribers. </p>
  
  <p>Could anyone please help to figure out what could be the reason for this behavior?</p>
  
  <p>Thanks in advance!</p>