change image fetch timeout
This commit is contained in:
parent
2f3280d4e7
commit
302a6c6841
2 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,7 @@ public class Register {
|
|||
PERMISSIONS = new HashMap<>();
|
||||
|
||||
this.api = api;
|
||||
|
||||
}
|
||||
|
||||
public void register(Object handle) {
|
||||
|
|
|
@ -24,6 +24,7 @@ public class ImageFetcher {
|
|||
final URL url = new URL(link);
|
||||
final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0");
|
||||
connection.setConnectTimeout(2000);
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue