chanotify should use interface{} keys

Fixes #79.

Signed-off-by: Burcu Dogan <jbd@golang.org>
This commit is contained in:
Burcu Dogan 2016-01-22 08:15:13 -08:00
parent 85bc51df33
commit bc4f1aae01
4 changed files with 17 additions and 17 deletions

View file

@ -50,7 +50,7 @@ func New(id, stateDir string, tasks chan *StartTask, oom bool) (*Supervisor, err
go func() {
for id := range s.notifier.Chan() {
e := NewEvent(OOMEventType)
e.ID = id
e.ID = id.(string)
s.SendEvent(e)
}
}()

View file

@ -74,7 +74,7 @@ func (w *worker) Start() {
if err != nil {
logrus.WithField("error", err).Error("containerd: notify OOM events")
} else {
w.s.notifier.Add(n, t.Container.ID())
w.s.notifier.Add(t.Container.ID(), n)
}
}
ContainerStartTimer.UpdateSince(started)