mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-22 20:28:00 +00:00
Make the PubSub Listener its own thread
This commit is contained in:
parent
d57c825c76
commit
983d7567da
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user