Don't log event error on driver shutdown
This commit is contained in:
parent
39542b4cf0
commit
c3f05f2476
|
@ -447,6 +447,11 @@ func (i *instanceManager) handleEvents() {
|
|||
|
||||
// handleEvent looks up the event handler(s) for the event and runs them
|
||||
func (i *instanceManager) handleEvent(ev *drivers.TaskEvent) {
|
||||
// Do not emit that the plugin is shutdown
|
||||
if ev.Err != nil && ev.Err == base.ErrPluginShutdown {
|
||||
return
|
||||
}
|
||||
|
||||
if handler := i.eventHandlerFactory(ev.AllocID, ev.TaskName); handler != nil {
|
||||
i.logger.Trace("task event received", "event", ev)
|
||||
handler(ev)
|
||||
|
|
Loading…
Reference in a new issue