Skip to content

Commit

Permalink
Fix the graceful shutdown sequence
Browse files Browse the repository at this point in the history
This change also shuts down with SIGTERM, which is the signal that
systemd (or any other reasonable service manager) sends to inform of
termination.
  • Loading branch information
lhchavez committed Feb 17, 2019
1 parent 8bc07e1 commit 551f771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/omegaup-gitserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"os"
"os/signal"
"strings"
"syscall"
"time"
)

Expand Down Expand Up @@ -222,7 +223,7 @@ func main() {
}

stopChan := make(chan os.Signal)
signal.Notify(stopChan, os.Interrupt)
signal.Notify(stopChan, syscall.SIGINT, syscall.SIGTERM)

var authCallback githttp.AuthorizationCallback
if *publicKeyBase64 == "" && *secretToken != "" {
Expand Down

0 comments on commit 551f771

Please sign in to comment.