Skip to content
Snippets Groups Projects
Commit cb310f77 authored by AlexStocks's avatar AlexStocks
Browse files

Mod: gettyRPCClient.created -> active

parent 44d35403
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment