diff --git a/src/main/java/net/neoforged/neoform/runtime/downloads/DownloadManager.java b/src/main/java/net/neoforged/neoform/runtime/downloads/DownloadManager.java index 9ee7ff6..632da0c 100644 --- a/src/main/java/net/neoforged/neoform/runtime/downloads/DownloadManager.java +++ b/src/main/java/net/neoforged/neoform/runtime/downloads/DownloadManager.java @@ -91,10 +91,13 @@ public boolean download(DownloadSpec spec, Path finalLocation, boolean silent) t try { response = httpClient.send(request, HttpResponse.BodyHandlers.ofFile(partialFile)); } catch (IOException e) { - // We do not have an API to get this information if ("too many concurrent streams".equals(e.getMessage())) { + // We do not have an API to get this limit from the connection and just retry :( waitForRetry(1); continue; + } else if (e.getMessage() != null && e.getMessage().endsWith(" GOAWAY received")) { + // Retry this immediately, since it usually indicates we've reached max requests per connection + continue; } throw e; } catch (InterruptedException e) {