gaoxinge edited a comment on pull request #1045:
URL: https://github.com/apache/dubbo-go/pull/1045#issuecomment-774380816


   I think some specific interleaving execution of `Invoke` and `Destroy` may 
lead to panic:
   
   |Invoke|Destroy|Description|
   |-------|---------|------------|
   |di.closed.Load() / di.reqNum().Load()<0||return false because destroy has 
not been called|
   ||di.closed.Store(true)||
   ||di.reqNum.Load() == 0|return true because no reqNum has been added in 
invoke|
   ||di.reqNum.Add(-1)||
   ||di.client = nil|set di.client to nil|
   |di.reqNum.Add(1)|||
   |di.client.Request||may panic because di.client is nil||
   |di.reqNum.Add(-1)|||


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to