ForgeGradle icon indicating copy to clipboard operation
ForgeGradle copied to clipboard

DownloadUtils doesn't set a timeout, causing downloads to hang if a server doesn't respond

Open Barteks2x opened this issue 1 year ago • 1 comments

This is one of java's dumb default: https://github.com/MinecraftForge/ForgeGradle/blob/63b758333137a929ae37186ff8c10d1335f934d0/src/common/java/net/minecraftforge/gradle/common/util/DownloadUtils.java#L213-L237 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.

Barteks2x avatar Feb 26 '24 08:02 Barteks2x