Skip to content

Commit a721a41

Browse files
committed
cf: retry file download when PrematureCloseException
1 parent 868521f commit a721a41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/me/itzg/helpers/curseforge/CurseForgeInstaller.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import reactor.core.publisher.Flux;
6666
import reactor.core.publisher.Mono;
6767
import reactor.core.scheduler.Schedulers;
68+
import reactor.netty.http.client.PrematureCloseException;
6869
import reactor.util.retry.Retry;
6970

7071
@RequiredArgsConstructor
@@ -756,7 +757,8 @@ private Mono<DownloadOrResolveResult> buildRetryableDownload(InstallContext con
756757
Retry.fixedDelay(BAD_FILE_ATTEMPTS, BAD_FILE_DELAY)
757758
.filter(throwable ->
758759
throwable instanceof FileHashInvalidException ||
759-
throwable instanceof FailedRequestException
760+
throwable instanceof FailedRequestException ||
761+
throwable instanceof PrematureCloseException
760762
)
761763
.doBeforeRetry(retrySignal ->
762764
log.warn("Retrying to download {} @ {}:{}",

0 commit comments

Comments
 (0)