Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
cb310f77
Commit
cb310f77
authored
5 years ago
by
AlexStocks
Browse files
Options
Downloads
Patches
Plain Diff
Mod: gettyRPCClient.created -> active
parent
44d35403
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
protocol/dubbo/pool.go
+4
-4
4 additions, 4 deletions
protocol/dubbo/pool.go
with
4 additions
and
4 deletions
protocol/dubbo/pool.go
+
4
−
4
View file @
cb310f77
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment