Fixed XDS Server connection lost and reconnection.
[src/xds/xds-agent.git] / lib / agent / apiv1-config.go
index bd4da33..0b1e200 100644 (file)
@@ -68,6 +68,9 @@ func (s *APIService) setConfig(c *gin.Context) {
 
        // Add new XDS Server
        for _, svr := range cfgArg.Servers {
+               if svr.Connected && svr.ID != "" {
+                       continue
+               }
                cfg := xdsconfig.XDSServerConf{
                        ID:        svr.ID,
                        URL:       svr.URL,