You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/02/22 11:54:49 UTC

[dubbo-go] branch develop updated: Update dubbo_invoker.go

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new befd3e5  Update dubbo_invoker.go
     new 24e0d8c  Merge pull request #1026 from lin-jianjun/patch-2
befd3e5 is described below

commit befd3e51256f8fd92bfe42a8c588bda6b79e6205
Author: linjianjun <22...@qq.com>
AuthorDate: Thu Jan 28 21:51:50 2021 +0800

    Update dubbo_invoker.go
    
    竞态告警
---
 protocol/dubbo/dubbo_invoker.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go
index acddfd6..6f45078 100644
--- a/protocol/dubbo/dubbo_invoker.go
+++ b/protocol/dubbo/dubbo_invoker.go
@@ -87,7 +87,7 @@ func (di *DubboInvoker) Invoke(ctx context.Context, invocation protocol.Invocati
 		err    error
 		result protocol.RPCResult
 	)
-	if di.reqNum < 0 {
+	if atomic.LoadInt64(di.reqNum) < 0 {
 		// Generally, the case will not happen, because the invoker has been removed
 		// from the invoker list before destroy,so no new request will enter the destroyed invoker
 		logger.Warnf("this dubboInvoker is destroyed")