mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
fix(snapshots): avoid a last-write-wins situation EE-5701 (#9156)
This commit is contained in:
parent
91088a5e0f
commit
31d68f8091
1 changed files with 1 additions and 8 deletions
|
@ -271,14 +271,7 @@ func (service *Service) snapshotEnvironment(endpointID portainer.EndpointID, tun
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointURL := endpoint.URL
|
|
||||||
|
|
||||||
endpoint.URL = fmt.Sprintf("tcp://127.0.0.1:%d", tunnelPort)
|
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.snapshotService.SnapshotEndpoint(endpoint)
|
||||||
return service.dataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue