Perform a nil-check for Executor's consulServices.

Executors can `Shutdown()` before calling `SyncServices()`.
This commit is contained in:
Sean Chittenden
2016-06-10 23:43:54 -04:00
parent 5331ea7bc6
commit 2879c33c8f

View File

@@ -425,7 +425,9 @@ func (e *UniversalExecutor) Exit() error {
e.lre.Close()
e.lro.Close()
e.consulSyncer.Shutdown()
if e.consulSyncer != nil {
e.consulSyncer.Shutdown()
}
// If the executor did not launch a process, return.
if e.command == nil {