Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cc4d2cbe
Commit
cc4d2cbe
authored
Dec 23, 2017
by
vikaschoudhary16
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a race in the endpoint.go
parent
572e2764
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
endpoint.go
pkg/kubelet/cm/deviceplugin/endpoint.go
+5
-1
No files found.
pkg/kubelet/cm/deviceplugin/endpoint.go
View file @
cc4d2cbe
...
@@ -164,7 +164,11 @@ func (e *endpointImpl) run() {
...
@@ -164,7 +164,11 @@ func (e *endpointImpl) run() {
}
}
e
.
mutex
.
Lock
()
e
.
mutex
.
Lock
()
e
.
devices
=
devices
// NOTE: Return a copy of 'devices' instead of returning a direct reference to local 'devices'
e
.
devices
=
make
(
map
[
string
]
pluginapi
.
Device
)
for
_
,
d
:=
range
devices
{
e
.
devices
[
d
.
ID
]
=
d
}
e
.
mutex
.
Unlock
()
e
.
mutex
.
Unlock
()
e
.
callback
(
e
.
resourceName
,
added
,
updated
,
deleted
)
e
.
callback
(
e
.
resourceName
,
added
,
updated
,
deleted
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment