Skip to content

Commit

Permalink
catalyst-node: re-add MistUtilLoad shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
iameli committed Nov 18, 2022
1 parent 1859029 commit 76cd4a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/catalyst-node/catalyst-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import (
"net/url"
"os"
"os/exec"
"os/signal"
"regexp"
"runtime"
"strings"
"sync"
"syscall"
"time"

serfclient "github.com/hashicorp/serf/client"
Expand Down Expand Up @@ -375,6 +377,16 @@ func main() {
}
}()

go func() {
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
for {
s := <-c
glog.Errorf("caught signal=%v killing MistUtilLoad", s)
killchan <- true
}
}()

// Everything past this is booting up Serf
tmpFile, err := writeSerfConfig(&serfConfig)
if err != nil {
Expand Down

0 comments on commit 76cd4a0

Please sign in to comment.