You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/06/05 01:08:35 UTC

[GitHub] [dubbo-go] mark1995 commented on issue #585: Why not use the default client

mark1995 commented on issue #585:
URL: https://github.com/apache/dubbo-go/issues/585#issuecomment-639198979


   > it is the same as #256.
   > We reuse the connection in getty.
   > please check https://github.com/apache/dubbo-go/pull/482/files
   
   
   Thank you for your reply, but I haven't seen such processing in the latest branch and master branch. Is there any new consideration? In the code, we still see that the new client will create a new connection pool.
   
   ```
   func (p *gettyRPCClientPool) getGettyRpcClient(protocol, addr string) (*gettyRPCClient, error) {
   	conn, err := p.get()
   	if err == nil && conn == nil {
   		// create new conn
   		rpcClientConn, err := newGettyRPCClientConn(p, protocol, addr)
   		return rpcClientConn, perrors.WithStack(err)
   	}
   	return conn, perrors.WithStack(err)
   }
   ```
   
   
   In the example given by the official, this operation will cause a memory leak about goroutine:
   ```
        referenceConfig.GetRPCService().(*config.GenericService).Invoke([]interface{}{"GetUser",[]string{"java.lang.String"}, []interface{}{"A003"}})
   ```
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org