diff options
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r-- | runsc/boot/controller.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index b605aa40a..34f939953 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -15,10 +15,10 @@ package boot import ( - "context" "errors" "fmt" "os" + gtime "time" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" @@ -166,8 +166,11 @@ func newController(fd int, l *Loader) (*controller, error) { return ctrl, nil } -func (c *controller) stop(ctx context.Context) { - c.srv.Stop(ctx) +// stopRPCTimeout is the time for clients to complete ongoing RPCs. +const stopRPCTimeout = 15 * gtime.Second + +func (c *controller) stop() { + c.srv.Stop(stopRPCTimeout) } // containerManager manages sandbox containers. |