agent: reload SCADA client if endpoint changes

This commit is contained in:
Ryan Uber 2015-08-27 13:29:07 -07:00
parent 3b3fb7f8c9
commit 11e4cfd72b
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