Skip to content

Commit fb872ce

Browse files
committed
runtime: fix shutdown runc v2 service
Signed-off-by: IceberGu <[email protected]> (cherry picked from commit b458583) Signed-off-by: Iceber Gu <[email protected]>
1 parent 070cc01 commit fb872ce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

runtime/v2/runc/v2/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,10 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (*task
620620

621621
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
622622
s.mu.Lock()
623+
defer s.mu.Unlock()
624+
623625
// return out if the shim is still servicing containers
624626
if len(s.containers) > 0 {
625-
s.mu.Unlock()
626627
return empty, nil
627628
}
628629
s.cancel()

0 commit comments

Comments
 (0)