Skip to content

Commit

Permalink
Merge pull request #611 from ymwneu/FixSemaphore
Browse files Browse the repository at this point in the history
[ISSUE #604]Fix semaphore problem
  • Loading branch information
duhenglucky committed Dec 20, 2018
2 parents b06074a + 9fe30e2 commit 385c695
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -410,7 +410,8 @@ public void invokeAsyncImpl(final Channel channel, final RemotingCommand request
final SemaphoreReleaseOnlyOnce once = new SemaphoreReleaseOnlyOnce(this.semaphoreAsync);
long costTime = System.currentTimeMillis() - beginStartTime;
if (timeoutMillis < costTime) {
throw new RemotingTooMuchRequestException("invokeAsyncImpl call timeout");
once.release();
throw new RemotingTimeoutException("invokeAsyncImpl call timeout");
}

final ResponseFuture responseFuture = new ResponseFuture(channel, opaque, timeoutMillis - costTime, invokeCallback, once);
Expand Down

0 comments on commit 385c695

Please sign in to comment.