1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-09-16 08:36:30 +02:00

Add SIGKILL to shutdown signals (#1552)

* Add SIGKILL to shutdown signals

* go mod tidy

* Add missing file
This commit is contained in:
Janos Dobronszki
2020-04-21 14:00:12 +02:00
committed by GitHub
parent 7c31edd5f8
commit e5c215556e
4 changed files with 19 additions and 6 deletions

View File

@@ -10,7 +10,6 @@ import (
"path/filepath"
"strings"
"sync"
"syscall"
"time"
"github.com/micro/cli/v2"
@@ -20,6 +19,7 @@ import (
maddr "github.com/micro/go-micro/v2/util/addr"
mhttp "github.com/micro/go-micro/v2/util/http"
mnet "github.com/micro/go-micro/v2/util/net"
signalutil "github.com/micro/go-micro/v2/util/signal"
mls "github.com/micro/go-micro/v2/util/tls"
)
@@ -404,7 +404,7 @@ func (s *service) Run() error {
ch := make(chan os.Signal, 1)
if s.opts.Signal {
signal.Notify(ch, syscall.SIGTERM, syscall.SIGINT)
signal.Notify(ch, signalutil.ShutdownSignals()...)
}
select {