mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-30 08:50:48 +01:00
mod
This commit is contained in:
1 parent
e15e2e23c4
commit
9da70aa3dc
1 file changed
+2
-1
@@ -124,7 +124,8 @@ public class FilerGrpcClient {
|
||||
|
||||
// Get a channel from the pool using round-robin
|
||||
private ManagedChannel getChannel() {
|
||||
int index = Math.abs(channelIndex.getAndIncrement() % CHANNEL_POOL_SIZE);
|
||||
int raw = channelIndex.getAndIncrement();
|
||||
int index = Math.floorMod(raw, CHANNEL_POOL_SIZE);
|
||||
return channelPool.get(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user