mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
GODT-1650: Log IMAP errors
This commit is contained in:
@ -29,7 +29,17 @@ func (bridge *Bridge) serveIMAP() error {
|
|||||||
|
|
||||||
bridge.imapListener = imapListener
|
bridge.imapListener = imapListener
|
||||||
|
|
||||||
return bridge.imapServer.Serve(context.Background(), bridge.imapListener)
|
if err := bridge.imapServer.Serve(context.Background(), bridge.imapListener); err != nil {
|
||||||
|
return fmt.Errorf("failed to serve IMAP: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
for err := range bridge.imapServer.GetErrorCh() {
|
||||||
|
logrus.WithError(err).Error("IMAP server error")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bridge *Bridge) restartIMAP(ctx context.Context) error {
|
func (bridge *Bridge) restartIMAP(ctx context.Context) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user