mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 03:25:19 +01:00
Impose 15 second timeout on all http calls (#2436)
This commit is contained in:
parent
0fd7f643a7
commit
cd0fd80b33
@ -119,7 +119,11 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
|
||||
this.localeManager.tryLoad(this, getBootstrap().getConfigDirectory().resolve("lang.yml"));
|
||||
|
||||
// setup a bytebin instance
|
||||
this.bytebin = new BytebinClient(new OkHttpClient(), getConfiguration().get(ConfigKeys.BYTEBIN_URL), "luckperms");
|
||||
OkHttpClient httpClient = new OkHttpClient.Builder()
|
||||
.callTimeout(15, TimeUnit.SECONDS)
|
||||
.build();
|
||||
|
||||
this.bytebin = new BytebinClient(httpClient, getConfiguration().get(ConfigKeys.BYTEBIN_URL), "luckperms");
|
||||
|
||||
// now the configuration is loaded, we can create a storage factory and load initial dependencies
|
||||
StorageFactory storageFactory = new StorageFactory(this);
|
||||
|
Loading…
Reference in New Issue
Block a user