1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

nfd-master: print gRPC server error correctly

(cherry picked from commit e95a4dd460)
This commit is contained in:
Markus Lehtonen 2022-01-20 20:11:54 +02:00
parent 185c5c10c5
commit 5d8a551c30

View file

@ -241,8 +241,11 @@ func (m *nfdMaster) Run() error {
return err
}
case <-grpcErr:
return fmt.Errorf("gRPC server exited with an error: %v", err)
case err := <-grpcErr:
if err != nil {
return fmt.Errorf("gRPC server exited with an error: %v", err)
}
klog.Infof("gRPC server stopped")
case <-m.stop:
klog.Infof("shutting down nfd-master")