Skip to content

Commit 6b8cbbe

Browse files
authored
cf: also retry file download on Netty ChannelException (#593)
1 parent 7eb2899 commit 6b8cbbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import static me.itzg.helpers.singles.MoreCollections.safeStreamFrom;
99

1010
import com.fasterxml.jackson.databind.JsonMappingException;
11+
import io.netty.channel.ChannelException;
1112
import java.io.File;
1213
import java.io.IOException;
1314
import java.io.InputStream;
@@ -65,7 +66,6 @@
6566
import reactor.core.publisher.Flux;
6667
import reactor.core.publisher.Mono;
6768
import reactor.core.scheduler.Schedulers;
68-
import reactor.netty.http.client.PrematureCloseException;
6969
import reactor.util.retry.Retry;
7070

7171
@RequiredArgsConstructor
@@ -758,7 +758,8 @@ private Mono<DownloadOrResolveResult> buildRetryableDownload(InstallContext con
758758
.filter(throwable ->
759759
throwable instanceof FileHashInvalidException ||
760760
throwable instanceof FailedRequestException ||
761-
throwable instanceof PrematureCloseException
761+
throwable instanceof IOException ||
762+
throwable instanceof ChannelException
762763
)
763764
.doBeforeRetry(retrySignal ->
764765
log.warn("Retrying to download {} @ {}:{}",

0 commit comments

Comments
 (0)