Skip to content

Commit 4170e1f

Browse files
committed
More logging.
1 parent 3e830b8 commit 4170e1f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

cmd/state-svc/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ func main() {
5454
events.Close("config", cfg.Close)
5555
}
5656

57+
logging.Debug("wait for events")
5758
if err := events.WaitForEvents(5*time.Second, rollbar.Wait, authentication.LegacyClose, logging.Close); err != nil {
5859
logging.Warning("Failing to wait events")
5960
}
61+
logging.Debug("exiting with code %d", exitCode)
6062
os.Exit(exitCode)
6163
}()
6264

internal/svcctl/svcctl.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ func LogFileName(ipComm IPCommunicator) (string, error) {
137137
}
138138

139139
func StopServer(ipComm IPCommunicator) error {
140-
_, err := LocateHTTP(ipComm)
141-
if err != nil {
142-
logging.Debug("service is not running")
143-
return nil // service is not up and running, so nothing to do
144-
}
145-
logging.Debug("service is running")
146-
147140
ctx, cancel := context.WithTimeout(context.Background(), commonTimeout)
148141
defer cancel()
149142

@@ -152,6 +145,7 @@ func StopServer(ipComm IPCommunicator) error {
152145
if err != nil && !errors.As(err, &errServerDown) {
153146
return errs.Wrap(err, "Cannot stop service")
154147
}
148+
logging.Debug("service stopped")
155149

156150
return nil
157151
}

0 commit comments

Comments
 (0)