mirror of https://github.com/portainer/portainer
fix(snapshots): avoid a last-write-wins situation EE-5701 (#9156)
parent
91088a5e0f
commit
31d68f8091
|
@ -271,14 +271,7 @@ func (service *Service) snapshotEnvironment(endpointID portainer.EndpointID, tun
|
|||
return err
|
||||
}
|
||||
|
||||
endpointURL := endpoint.URL
|
||||
|
||||
endpoint.URL = fmt.Sprintf("tcp://127.0.0.1:%d", tunnelPort)
|
||||
err = service.snapshotService.SnapshotEndpoint(endpoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
endpoint.URL = endpointURL
|
||||
return service.dataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint)
|
||||
return service.snapshotService.SnapshotEndpoint(endpoint)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue