Skip to content

Commit

Permalink
Reverted comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatrykx committed Apr 26, 2021
1 parent 538dc69 commit 26fce9a
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions cmd/sriovdp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package main

import (
"flag"
// "os"
// "os/signal"
// "syscall"
"os"
"os/signal"
"syscall"

"github.com/golang/glog"
"github.com/k8snetworkplumbingwg/sriov-network-device-plugin/pkg/config"
Expand Down Expand Up @@ -86,28 +86,28 @@ func main() {
return
}

// glog.Infof("Initializing resource servers")
// if err := rm.initServers(); err != nil {
// glog.Errorf("error initializing resource servers %v", err)
// return
// }

// glog.Infof("Starting all servers...")
// if err := rm.startAllServers(); err != nil {
// glog.Errorf("error starting resource servers %v\n", err)
// return
// }
// glog.Infof("All servers started.")
// glog.Infof("Listening for term signals")
// // respond to syscalls for termination
// sigCh := make(chan os.Signal, 1)
// signal.Notify(sigCh, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)

// // Catch termination signals
// select {
// case sig := <-sigCh:
// glog.Infof("Received signal \"%v\", shutting down.", sig)
// rm.stopAllServers()
// return
// }
glog.Infof("Initializing resource servers")
if err := rm.initServers(); err != nil {
glog.Errorf("error initializing resource servers %v", err)
return
}

glog.Infof("Starting all servers...")
if err := rm.startAllServers(); err != nil {
glog.Errorf("error starting resource servers %v\n", err)
return
}
glog.Infof("All servers started.")
glog.Infof("Listening for term signals")
// respond to syscalls for termination
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)

// Catch termination signals
select {
case sig := <-sigCh:
glog.Infof("Received signal \"%v\", shutting down.", sig)
rm.stopAllServers()
return
}
}

0 comments on commit 26fce9a

Please sign in to comment.