From cb310f77bbf7b88ad5f3363d34961a3783e915f0 Mon Sep 17 00:00:00 2001 From: AlexStocks <alexstocks@foxmail.com> Date: Wed, 4 Sep 2019 13:00:01 +0800 Subject: [PATCH] Mod: gettyRPCClient.created -> active --- protocol/dubbo/pool.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/dubbo/pool.go b/protocol/dubbo/pool.go index cdd2a10a4..c1762c8c1 100644 --- a/protocol/dubbo/pool.go +++ b/protocol/dubbo/pool.go @@ -39,7 +39,7 @@ type gettyRPCClient struct { once sync.Once protocol string addr string - created int64 // zero, not create or be destroyed + active int64 // zero, not create or be destroyed pool *gettyRPCClientPool @@ -85,11 +85,11 @@ func newGettyRPCClientConn(pool *gettyRPCClientPool, protocol, addr string) (*ge } func (c *gettyRPCClient) updateActive(active int64) { - atomic.StoreInt64(&c.created, active) + atomic.StoreInt64(&c.active, active) } func (c *gettyRPCClient) getActive() int64 { - return atomic.LoadInt64(&c.created) + return atomic.LoadInt64(&c.active) } func (c *gettyRPCClient) newSession(session getty.Session) error { @@ -305,7 +305,7 @@ func (p *gettyRPCClientPool) getGettyRpcClient(protocol, addr string) (*gettyRPC } continue } - conn.updateActive(now) //update created time + conn.updateActive(now) //update active time return conn, nil } -- GitLab