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

View file

@ -64,6 +64,7 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
if err != nil { if err != nil {
return err return err
} }
defer conn.Close()
// Block until job is started // Block until job is started
<-ch <-ch