You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by vo...@apache.org on 2018/12/14 12:36:20 UTC
[rocketmq] 04/04: Revert "Release semaphore when timeout"
This is an automated email from the ASF dual-hosted git repository.
vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
commit b06074a559b33b0cabe33fc0f0cc4991c8da7848
Author: von gosling <vo...@apache.org>
AuthorDate: Fri Dec 14 20:35:21 2018 +0800
Revert "Release semaphore when timeout"
This reverts commit d4d02b5e017ebf8c7d3405516264645280cf57fa.
---
.../java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
index 9b02640..8dccebc 100644
--- a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
+++ b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
@@ -410,8 +410,7 @@ public abstract class NettyRemotingAbstract {
final SemaphoreReleaseOnlyOnce once = new SemaphoreReleaseOnlyOnce(this.semaphoreAsync);
long costTime = System.currentTimeMillis() - beginStartTime;
if (timeoutMillis < costTime) {
- once.release();
- throw new RemotingTimeoutException("invokeAsyncImpl call timeout");
+ throw new RemotingTooMuchRequestException("invokeAsyncImpl call timeout");
}
final ResponseFuture responseFuture = new ResponseFuture(channel, opaque, timeoutMillis - costTime, invokeCallback, once);