Remove 5 second wait starting MsgListenerContainer
with no listeners DATAREDIS-207
This commit is contained in:
@@ -190,11 +190,13 @@ public class RedisMessageListenerContainer implements InitializingBean, Disposab
|
||||
// technically speaking we can only be notified right before the subscription starts
|
||||
synchronized (monitor) {
|
||||
lazyListen();
|
||||
try {
|
||||
// wait up to 5 seconds
|
||||
monitor.wait(initWait);
|
||||
} catch (InterruptedException e) {
|
||||
// stop waiting
|
||||
if(listening) {
|
||||
try {
|
||||
// wait up to 5 seconds for Subscription thread
|
||||
monitor.wait(initWait);
|
||||
} catch (InterruptedException e) {
|
||||
// stop waiting
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user