From 994a000e36e98f4eb24d70f50201204808e41fde Mon Sep 17 00:00:00 2001 From: Romain LE JEUNE Date: Thu, 8 Sep 2022 11:15:34 +0200 Subject: [PATCH] GODT-1835: restart after keychain change [skip-ci] --- internal/frontend/grpc/service_methods.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/frontend/grpc/service_methods.go b/internal/frontend/grpc/service_methods.go index 95c1ae1f..fbd2a601 100644 --- a/internal/frontend/grpc/service_methods.go +++ b/internal/frontend/grpc/service_methods.go @@ -613,8 +613,9 @@ func (s *Service) AvailableKeychains(context.Context, *emptypb.Empty) (*Availabl return &AvailableKeychainsResponse{Keychains: keychains}, nil } -func (s *Service) SetCurrentKeychain(_ context.Context, keychain *wrapperspb.StringValue) (*emptypb.Empty, error) { +func (s *Service) SetCurrentKeychain(ctx context.Context, keychain *wrapperspb.StringValue) (*emptypb.Empty, error) { s.log.WithField("keychain", keychain.Value).Info("SetCurrentKeyChain") // we do not check validity. + defer func() { _, _ = s.Restart(ctx, &emptypb.Empty{}) }() defer func() { _ = s.SendEvent(NewKeychainChangeKeychainFinishedEvent()) }() if s.bridge.GetKeychainApp() == keychain.Value {