Commit c846d5fe authored by vikaschoudhary16's avatar vikaschoudhary16

Fix race between stopping old and starting new endpoint

parent 4344d337
...@@ -333,6 +333,7 @@ func (m *ManagerImpl) addEndpoint(r *pluginapi.RegisterRequest) { ...@@ -333,6 +333,7 @@ func (m *ManagerImpl) addEndpoint(r *pluginapi.RegisterRequest) {
// to avoid potential orphaned devices upon re-registration // to avoid potential orphaned devices upon re-registration
devices := make(map[string]pluginapi.Device) devices := make(map[string]pluginapi.Device)
for _, device := range old.getDevices() { for _, device := range old.getDevices() {
device.Health = pluginapi.Unhealthy
devices[device.ID] = device devices[device.ID] = device
} }
existingDevs = devices existingDevs = devices
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment