minor fixes

pull/282/head
Nikita 9 years ago
parent 1ceb5a1a1c
commit 161dd1c2d2

@ -97,9 +97,9 @@ public class RedissonCountDownLatch extends RedissonObject implements RCountDown
@Override
public boolean onStatus(PubSubType type, String channel) {
if (channel.equals(getChannelName()) && !value.getPromise().isSuccess()
if (channel.equals(getChannelName())
&& type == PubSubType.SUBSCRIBE) {
value.getPromise().setSuccess(value);
value.getPromise().trySuccess(value);
return true;
}
return false;

@ -104,9 +104,8 @@ public class RedissonLock extends RedissonExpirable implements RLock {
@Override
public boolean onStatus(PubSubType type, String channel) {
if (channel.equals(getChannelName())
&& !value.getPromise().isSuccess()
&& type == PubSubType.SUBSCRIBE) {
value.getPromise().setSuccess(value);
value.getPromise().trySuccess(value);
return true;
}
return false;
@ -161,7 +160,7 @@ public class RedissonLock extends RedissonExpirable implements RLock {
}
Future<RedissonLockEntry> future = subscribe();
future.awaitUninterruptibly();
future.syncUninterruptibly();
try {
while (true) {

Loading…
Cancel
Save