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:
Mrunal Patel 2017-08-24 16:37:56 -07:00
parent 6d88985d8b
commit 8cad9840fa
1 changed files with 1 additions and 0 deletions

View File

@ -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