Skip to content

Commit

Permalink
CNF-16568: remove unreachable code in gpsd and gpspipe process handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
nocturnalastro committed Jan 29, 2025
1 parent 171e2a8 commit 3927446
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
7 changes: 0 additions & 7 deletions pkg/daemon/gpsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,6 @@ func (g *GPSD) CmdRun(stdoutToSocket bool) {
glog.Infof("%s cmd: %+v", g.Name(), g.cmd)
g.cmd.Stderr = os.Stderr
var err error
if err != nil {
glog.Errorf("CmdRun() error creating StdoutPipe for %s: %v", g.Name(), err)
if g.stopped {
return
}
time.Sleep(5 * time.Second)
}
// Don't restart after termination
if !g.Stopped() {
time.Sleep(1 * time.Second)
Expand Down
8 changes: 0 additions & 8 deletions pkg/daemon/gpspipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ func (gp *gpspipe) CmdRun(stdoutToSocket bool) {
glog.Infof("%s cmd: %+v", gp.Name(), gp.cmd)
gp.cmd.Stderr = os.Stderr
var err error
if err != nil {
glog.Errorf("CmdRun() error creating StdoutPipe for %s: %v", gp.Name(), err)
if gp.Stopped() {
return
}
time.Sleep(1 * time.Second)
continue
}
// Don't restart after termination
if !gp.Stopped() {
time.Sleep(1 * time.Second)
Expand Down

0 comments on commit 3927446

Please sign in to comment.