From 31d68f80911dc266ceadf2a49bd70a16a9682fb8 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Wed, 5 Jul 2023 17:27:05 -0300 Subject: [PATCH] fix(snapshots): avoid a last-write-wins situation EE-5701 (#9156) --- api/chisel/service.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/chisel/service.go b/api/chisel/service.go index 9524dc971..2c39a9a5a 100644 --- a/api/chisel/service.go +++ b/api/chisel/service.go @@ -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) }