Try to recognize email websocket going away

This commit is contained in:
Eli Ribble 2026-05-20 23:02:37 +00:00
parent 7a0a3c887b
commit 9d1063187a
No known key found for this signature in database

View file

@ -80,6 +80,12 @@ func StartWebsocket(ctx context.Context, username, password string) {
time.Sleep(10 * time.Second)
continue
}
if websocket.IsCloseError(err, websocket.CloseGoingAway) {
conn = nil
log.Info().Msg("email websocket server going away")
time.Sleep(60 * time.Second)
continue
}
log.Error().Err(err).Msg("Error reading message")
time.Sleep(10 * time.Second)
continue