Skip to content

Commit

Permalink
device: fix redefined notify channel
Browse files Browse the repository at this point in the history
Otherwise the channel we are waiting on is not the one we
put in the device watchers map.

Fixes: kata-containers#372

Signed-off-by: Peng Tao <bergwolf@gmail.com>
  • Loading branch information
bergwolf committed Sep 20, 2018
1 parent 4163b8b commit 1310f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion device.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func getPCIDeviceName(s *sandbox, pciID string) (string, error) {
// Note this is done inside the lock, not to miss any events from the
// global udev listener.
if devName == "" {
notifyChan := make(chan string, 1)
notifyChan = make(chan string, 1)
s.deviceWatchers[pciAddr] = notifyChan
}
s.Unlock()
Expand Down

0 comments on commit 1310f3d

Please sign in to comment.