mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 07:36:44 +00:00
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).
|
WithField("UseSSLForSMTP", settings.UseSSLForSmtp).
|
||||||
Debug("SetConnectionMode")
|
Debug("SetConnectionMode")
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer s.panicHandler.HandlePanic()
|
||||||
|
|
||||||
defer func() { _ = s.SendEvent(NewChangeMailServerSettingsFinishedEvent()) }()
|
defer func() { _ = s.SendEvent(NewChangeMailServerSettingsFinishedEvent()) }()
|
||||||
|
|
||||||
if s.bridge.GetIMAPSSL() != settings.UseSSLForImap {
|
if s.bridge.GetIMAPSSL() != settings.UseSSLForImap {
|
||||||
@ -671,6 +674,7 @@ func (s *Service) SetMailServerSettings(_ context.Context, settings *ImapSmtpSet
|
|||||||
}
|
}
|
||||||
|
|
||||||
_ = s.SendEvent(NewMailServerSettingsChangedEvent(s.getMailServerSettings()))
|
_ = s.SendEvent(NewMailServerSettingsChangedEvent(s.getMailServerSettings()))
|
||||||
|
}()
|
||||||
|
|
||||||
return &emptypb.Empty{}, nil
|
return &emptypb.Empty{}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user