You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/08/10 10:17:04 UTC

[plc4x] 01/02: fix(plc4xtools): set shutdown flag early to avoid corrupted files

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit dde3b0173a6491c4a053c81fcf10c043662f4bb6
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Aug 10 12:06:00 2022 +0200

    fix(plc4xtools): set shutdown flag early to avoid corrupted files
---
 plc4go/tools/plc4xbrowser/ui/common.go      | 2 +-
 plc4go/tools/plc4xpcapanalyzer/ui/common.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4go/tools/plc4xbrowser/ui/common.go b/plc4go/tools/plc4xbrowser/ui/common.go
index 84e31683b..78e5f7070 100644
--- a/plc4go/tools/plc4xbrowser/ui/common.go
+++ b/plc4go/tools/plc4xbrowser/ui/common.go
@@ -78,6 +78,6 @@ func Shutdown() {
 	for _, connection := range connections {
 		connection.Close()
 	}
-	saveConfig()
 	hasShutdown = true
+	saveConfig()
 }
diff --git a/plc4go/tools/plc4xpcapanalyzer/ui/common.go b/plc4go/tools/plc4xpcapanalyzer/ui/common.go
index c716a66d8..e144a4cb4 100644
--- a/plc4go/tools/plc4xpcapanalyzer/ui/common.go
+++ b/plc4go/tools/plc4xpcapanalyzer/ui/common.go
@@ -77,6 +77,6 @@ func Shutdown() {
 	if hasShutdown {
 		return
 	}
-	saveConfig()
 	hasShutdown = true
+	saveConfig()
 }