Skip to content

Commit

Permalink
Add timeout while waiting for StartTransinetUnit completion signal fr…
Browse files Browse the repository at this point in the history
…om dbus

Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
  • Loading branch information
vikaschoudhary16 committed Mar 7, 2018
1 parent ce80fa0 commit c39bc45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libcontainer/cgroups/systemd/apply_systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ func (m *Manager) Apply(pid int) error {
return err
}

<-statusChan
select {
case <-statusChan:
case <-time.After(time.Second):
}

if err := joinCgroups(c, pid); err != nil {
return err
Expand Down

0 comments on commit c39bc45

Please sign in to comment.