storagenode: avoid starting command on service stop (#3105)
This commit is contained in:
parent
8d16349b4c
commit
366a0be6aa
@ -12,8 +12,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/windows/svc"
|
||||
)
|
||||
@ -32,6 +33,8 @@ func init() {
|
||||
if err != nil {
|
||||
panic("Service failed: " + err.Error())
|
||||
}
|
||||
// avoid starting main() when service was stopped
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
type service struct{}
|
||||
|
@ -50,6 +50,8 @@ func init() {
|
||||
if err != nil {
|
||||
zap.S().Fatalf("Service failed: %v", err)
|
||||
}
|
||||
// avoid starting main() when service was stopped
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
type service struct{}
|
||||
|
Loading…
Reference in New Issue
Block a user