From d66930749a9f8eaa19acab78d57585a170f17429 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Thu, 24 Mar 2022 10:47:34 +0100 Subject: logging: fix race condition in startup If a panic occurs in one of the workers, it can happen after the UI was initialised, but before the cleanup function has been registered. With this the start of the worker loops is deferred until the cleanup routine was registered. Signed-off-by: Moritz Poldrack --- widgets/account-wizard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/account-wizard.go') diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go index 1645d457..42d14d17 100644 --- a/widgets/account-wizard.go +++ b/widgets/account-wizard.go @@ -535,7 +535,7 @@ func (wizard *AccountWizard) finish(tutorial bool) { wizard.conf.Accounts = append(wizard.conf.Accounts, account) view, err := NewAccountView(wizard.aerc, wizard.conf, &account, - wizard.aerc.logger, wizard.aerc) + wizard.aerc.logger, wizard.aerc, nil) if err != nil { wizard.aerc.NewTab(errorScreen(err.Error(), wizard.conf.Ui), account.Name) -- cgit