mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 10:38:01 +00:00
try to fix #40
This commit is contained in:
parent
c753bfa983
commit
8f38b5ddb8
8
pom.xml
8
pom.xml
@ -90,14 +90,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>javadoc</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
@ -27,12 +27,9 @@ import redis.clients.jedis.*;
|
||||
import redis.clients.jedis.exceptions.JedisConnectionException;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@ -225,7 +222,14 @@ public final class RedisBungee extends Plugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
((ThreadPoolExecutor) getExecutorService()).setMaximumPoolSize(32);
|
||||
ThreadFactory factory = ((ThreadPoolExecutor) getExecutorService()).getThreadFactory();
|
||||
try {
|
||||
Field field = this.getClass().getDeclaredField("executorService");
|
||||
field.setAccessible(true);
|
||||
field.set(this, Executors.newFixedThreadPool(24, factory));
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
try {
|
||||
loadConfig();
|
||||
} catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user