wenxuwan commented on a change in pull request #1010:
URL: https://github.com/apache/dubbo-go/pull/1010#discussion_r587073782
##########
File path: protocol/dubbo/dubbo_invoker.go
##########
@@ -196,8 +196,12 @@ func (di *DubboInvoker) Destroy() {
di.BaseInvoker.Destroy()
client := di.getClient()
if client != nil {
+ activeNumber := client.DecreaseActiveNumber()
di.setClient(nil)
- client.Close()
+ if activeNumber == 0 {
Review comment:
Good question, for the first question:
1.Should we close client in destroy method?
Yes, now the design is one node(VM)<=>one ExchangeClient. So we need close
the tcp conn when all the invokers destroyed.
2.If we should, should we close client after active number check?
As the answer in the first question, we need close the conn until all the
invokers(in one Node(VM)) destroyed.
----------------------------------------------------------------
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]