Skip to content

Commit

Permalink
Another better code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-anderson committed Jan 4, 2025
1 parent d5b8c3d commit b2f940d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ Completable applyRetryCallbacks(final Completable completable, final int retryCo
if (returnOriginalResponses) {
final StreamingHttpResponse response = extractStreamingResponse(t);
if (response != null) {
// If we succeed, we need to drain the response body before we continue. If we fail we want to
// surface the original exception and don't worry about draining since it will be returned to
// the user.
// If we succeed, we need to drain the response body before we continue. The retry completable
// fails we want to surface the original exception and don't worry about draining since the
// response will be returned to the user.
result = result.onErrorMap(backoffError -> ThrowableUtils.addSuppressed(t, backoffError))
// If we get cancelled we also need to drain the message body as there is no guarantee
// we'll ever receive a completion event, error or success. This is okay to do since
Expand Down

0 comments on commit b2f940d

Please sign in to comment.