engine: Small fixes

This commit is contained in:
James Shubin
2018-04-20 21:07:26 -04:00
parent 86a9181e9b
commit 9a8408a092

View File

@@ -69,11 +69,11 @@ type State struct {
eventsLock *sync.Mutex // lock around sending and closing of events channel eventsLock *sync.Mutex // lock around sending and closing of events channel
eventsDone bool // is channel closed? eventsDone bool // is channel closed?
// output is the channel that the engine listens on for events from the // outputChan is the channel that the engine listens on for events from
// Watch loop for that resource. The event is nil normally, except when // the Watch loop for that resource. The event is nil normally, except
// events are sent on this channel from the engine. This only happens // when events are sent on this channel from the engine. This only
// as a signaling mechanism when Watch has shutdown and we want to // happens as a signaling mechanism when Watch has shutdown and we want
// notify the Process loop which reads from this. // to notify the Process loop which reads from this.
outputChan chan error // outgoing from resource outputChan chan error // outgoing from resource
wg *sync.WaitGroup wg *sync.WaitGroup
@@ -336,6 +336,7 @@ func (obj *State) event() error {
case event.EventPoke: case event.EventPoke:
// we're trying to send an event, so swallow the // we're trying to send an event, so swallow the
// poke: it's what we wanted to have happen here // poke: it's what we wanted to have happen here
continue
case event.EventStart: case event.EventStart:
return fmt.Errorf("unexpected start") return fmt.Errorf("unexpected start")
case event.EventPause: case event.EventPause: