You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by il...@apache.org on 2019/09/03 09:11:37 UTC
[dubbo] branch master updated: considering methodStatus.active ==
Integer.MAX_VALUE (#4935)
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 3d94dae considering methodStatus.active == Integer.MAX_VALUE (#4935)
3d94dae is described below
commit 3d94daefef99223fbe827e66c843a2ba317efb91
Author: 孙传磊 <su...@users.noreply.github.com>
AuthorDate: Tue Sep 3 17:11:14 2019 +0800
considering methodStatus.active == Integer.MAX_VALUE (#4935)
---
.../dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java
index d3a2032..70b0d7b 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java
@@ -112,6 +112,9 @@ public class RpcStatus {
max = (max <= 0) ? Integer.MAX_VALUE : max;
RpcStatus appStatus = getStatus(url);
RpcStatus methodStatus = getStatus(url, methodName);
+ if (methodStatus.active.get() == Integer.MAX_VALUE) {
+ return false;
+ }
if (methodStatus.active.incrementAndGet() > max) {
methodStatus.active.decrementAndGet();
return false;