forked from Silverfish/proton-bridge
Other: setMailServerSettings is async as it should.
This commit is contained in:
@ -640,6 +640,9 @@ func (s *Service) SetMailServerSettings(_ context.Context, settings *ImapSmtpSet
|
||||
WithField("UseSSLForSMTP", settings.UseSSLForSmtp).
|
||||
Debug("SetConnectionMode")
|
||||
|
||||
go func() {
|
||||
defer s.panicHandler.HandlePanic()
|
||||
|
||||
defer func() { _ = s.SendEvent(NewChangeMailServerSettingsFinishedEvent()) }()
|
||||
|
||||
if s.bridge.GetIMAPSSL() != settings.UseSSLForImap {
|
||||
@ -671,6 +674,7 @@ func (s *Service) SetMailServerSettings(_ context.Context, settings *ImapSmtpSet
|
||||
}
|
||||
|
||||
_ = s.SendEvent(NewMailServerSettingsChangedEvent(s.getMailServerSettings()))
|
||||
}()
|
||||
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user