Merge pull request #107 from mlaventure/fix-stats-cmd
Fix stats command not returning
This commit is contained in:
commit
44252266e7
1 changed files with 3 additions and 4 deletions
|
@ -10,7 +10,6 @@ type StatsTask struct {
|
||||||
baseTask
|
baseTask
|
||||||
ID string
|
ID string
|
||||||
Stat chan *runtime.Stat
|
Stat chan *runtime.Stat
|
||||||
Err chan error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Supervisor) stats(t *StatsTask) error {
|
func (s *Supervisor) stats(t *StatsTask) error {
|
||||||
|
@ -23,12 +22,12 @@ func (s *Supervisor) stats(t *StatsTask) error {
|
||||||
go func() {
|
go func() {
|
||||||
s, err := i.container.Stats()
|
s, err := i.container.Stats()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Err <- err
|
t.ErrorCh() <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.Err <- nil
|
t.ErrorCh() <- nil
|
||||||
t.Stat <- s
|
t.Stat <- s
|
||||||
ContainerStatsTimer.UpdateSince(start)
|
ContainerStatsTimer.UpdateSince(start)
|
||||||
}()
|
}()
|
||||||
return nil
|
return errDeferedResponse
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue