mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-10-31 18:48:01 +00:00
Fix okhttp AccessControlException
This commit is contained in:
parent
f391793e45
commit
c6c73cf731
@ -14,6 +14,7 @@ import com.imaginarycode.minecraft.redisbungee.events.PubSubMessageEvent;
|
|||||||
import com.imaginarycode.minecraft.redisbungee.util.NameFetcher;
|
import com.imaginarycode.minecraft.redisbungee.util.NameFetcher;
|
||||||
import com.imaginarycode.minecraft.redisbungee.util.UUIDFetcher;
|
import com.imaginarycode.minecraft.redisbungee.util.UUIDFetcher;
|
||||||
import com.imaginarycode.minecraft.redisbungee.util.UUIDTranslator;
|
import com.imaginarycode.minecraft.redisbungee.util.UUIDTranslator;
|
||||||
|
import com.squareup.okhttp.Dispatcher;
|
||||||
import com.squareup.okhttp.OkHttpClient;
|
import com.squareup.okhttp.OkHttpClient;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
@ -434,6 +435,8 @@ public final class RedisBungee extends Plugin {
|
|||||||
public Void call() throws Exception {
|
public Void call() throws Exception {
|
||||||
service = Executors.newFixedThreadPool(16);
|
service = Executors.newFixedThreadPool(16);
|
||||||
httpClient = new OkHttpClient();
|
httpClient = new OkHttpClient();
|
||||||
|
Dispatcher dispatcher = new Dispatcher(service);
|
||||||
|
httpClient.setDispatcher(dispatcher);
|
||||||
NameFetcher.setHttpClient(httpClient);
|
NameFetcher.setHttpClient(httpClient);
|
||||||
UUIDFetcher.setHttpClient(httpClient);
|
UUIDFetcher.setHttpClient(httpClient);
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user