Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Local Path Provisioner
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Local Path Provisioner
Commits
b96bd977
Commit
b96bd977
authored
5 years ago
by
Taeho Kim
Committed by
Sheng Yang
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix time.Tick leak
parent
506b0df3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
provisioner.go
+3
-1
3 additions, 1 deletion
provisioner.go
with
3 additions
and
1 deletion
provisioner.go
+
3
−
1
View file @
b96bd977
...
...
@@ -119,9 +119,11 @@ func (p *LocalPathProvisioner) refreshConfig() error {
func
(
p
*
LocalPathProvisioner
)
watchAndRefreshConfig
()
{
go
func
()
{
ticker
:=
time
.
NewTicker
(
ConfigFileCheckInterval
)
defer
ticker
.
Stop
()
for
{
select
{
case
<-
ti
me
.
Tick
(
ConfigFileCheckInterval
)
:
case
<-
ti
cker
.
C
:
if
err
:=
p
.
refreshConfig
();
err
!=
nil
{
logrus
.
Errorf
(
"failed to load the new config file: %v"
,
err
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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