3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-07-30 09:08:09 +02:00

Prevent async task pool from being full (#2894)

Fixes #2883
Dieser Commit ist enthalten in:
Hancho1577 2022-03-19 20:45:19 +07:00 committet von GitHub
Ursprung 732fd90d48
Commit b81ad3f0db
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -601,6 +601,8 @@ public class SkinProvider {
HttpURLConnection con = (HttpURLConnection) new URL(imageUrl).openConnection();
con.setRequestProperty("User-Agent", "Geyser-" + GeyserImpl.getInstance().getPlatformType().toString() + "/" + GeyserImpl.VERSION);
con.setConnectTimeout(10000);
con.setReadTimeout(10000);
BufferedImage image = ImageIO.read(con.getInputStream());
if (image == null) throw new NullPointerException();

Datei anzeigen

@ -52,6 +52,8 @@ public class WebUtils {
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", "Geyser-" + GeyserImpl.getInstance().getPlatformType().toString() + "/" + GeyserImpl.VERSION); // Otherwise Java 8 fails on checking updates
con.setConnectTimeout(10000);
con.setReadTimeout(10000);
return connectionToString(con);
} catch (Exception e) {