agent: reload SCADA client if endpoint changes

This commit is contained in:
Ryan Uber 2015-08-27 13:29:07 -07:00
parent c1c83c5d87
commit d6b71de3f4
1 changed files with 2 additions and 1 deletions

View File

@ -909,7 +909,8 @@ func (c *Command) handleReload(config *Config) *Config {
// Reload SCADA client if we have a change
if newConf.AtlasInfrastructure != config.AtlasInfrastructure ||
newConf.AtlasToken != config.AtlasToken {
newConf.AtlasToken != config.AtlasToken ||
newConf.AtlasEndpoint != config.AtlasEndpoint {
if err := c.setupScadaConn(newConf); err != nil {
c.Ui.Error(fmt.Sprintf("Failed reloading SCADA client: %s", err))
return nil