Fix race between stopping old and starting new endpoint
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user