2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 10:38:01 +00:00

Make the PubSub Listener its own thread

This commit is contained in:
Tux 2013-11-26 14:51:52 -05:00
parent d57c825c76
commit 983d7567da

View File

@ -161,7 +161,7 @@ public class RedisBungee extends Plugin implements Listener {
getProxy().getPluginManager().registerListener(this, this);
api = new RedisBungeeAPI(this);
psl = new PubSubListener();
getProxy().getScheduler().runAsync(this, psl);
psl.start();
}
}
@ -305,11 +305,15 @@ public class RedisBungee extends Plugin implements Listener {
event.setResponse(reply);
}
private class PubSubListener implements Runnable {
private class PubSubListener extends Thread {
private Jedis rsc;
private JedisPubSubHandler jpsh;
private PubSubListener() {
super("RedisBungee PubSub Listener");
}
@Override
public void run() {
try {