You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ("https".equalsIgnoreCase(newUrl.getProtocol())) {
// Escalate from http to https.
// This is not done automatically by HttpURLConnection.setInstanceFollowRedirects
// See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4959149
returnconnectHttpWithRedirects(newUrl, setup);
}
break;
}
}
returncon;
}
if you don't explicitly set a timeout value, it will wait indefinitely for a response that may never arrive.
Normally this works because you either get a response or it fails. But sometimes, in some random cases of network issues, there is no response at all and it will hang, waiting forever for a nonexistent response.
The text was updated successfully, but these errors were encountered:
Barteks2x
changed the title
MavenArtifactDownloader doesn't set a timeout, causing downloads to hang if a server doesn't respond
DownloadUtils doesn't set a timeout, causing downloads to hang if a server doesn't respond
Feb 26, 2024
Interesting. it depends on the javac implementation it seems. Anyways if you want to set a timeout feel free to submit a pr. I'm fine with whatever as this is a dumb edge case
This is one of java's dumb default:
ForgeGradle/src/common/java/net/minecraftforge/gradle/common/util/DownloadUtils.java
Lines 213 to 237 in 63b7583
if you don't explicitly set a timeout value, it will wait indefinitely for a response that may never arrive.
Normally this works because you either get a response or it fails. But sometimes, in some random cases of network issues, there is no response at all and it will hang, waiting forever for a nonexistent response.
The text was updated successfully, but these errors were encountered: