mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #92 from ipuustin/conn-close
deviceplugin: don't call method on a nil value.
This commit is contained in:
commit
1f96cc82cd
@ -245,10 +245,10 @@ func registerWithKubelet(kubeletSocket, pluginEndPoint, resourceName string) err
|
||||
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
|
||||
return net.DialTimeout("unix", addr, timeout)
|
||||
}))
|
||||
defer conn.Close()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Cannot connect to kubelet service")
|
||||
}
|
||||
defer conn.Close()
|
||||
client := pluginapi.NewRegistrationClient(conn)
|
||||
reqt := &pluginapi.RegisterRequest{
|
||||
Version: pluginapi.Version,
|
||||
|
Loading…
Reference in New Issue
Block a user