Browse Source

修改data-redis,修改RSemaphore默认值设置

Signed-off-by: luoshi <luoshi@qmth.com.cn>
luoshi 3 years ago
parent
commit
af2946bf12

+ 1 - 0
data-redis/src/main/java/com/qmth/boot/redis/concurrent/RedisConcurrentService.java

@@ -62,6 +62,7 @@ public class RedisConcurrentService implements ConcurrentService, RedisConstant
     @Override
     public Semaphore getSemaphore(@NotNull String name) {
         RSemaphore semaphore = redissonClient.getSemaphore(name);
+        semaphore.trySetPermits(1);
         return new Semaphore() {
 
             @Override