utils: Fix close conn after starting scope
This fixes the goroutine leak in cri-o. Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
6d88985d8b
commit
8cad9840fa
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
// Block until job is started
|
||||
<-ch
|
||||
|
|
Loading…
Reference in a new issue