You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the application exits when one account could not connect to the mail server. Wouldn't it be better to run another connection attempt after a short time period?
I think of these kind of changes:
diff --git a/ayatanawebmail/application.py b/ayatanawebmail/application.py
index 917fb3b..c17c4c8 100755
--- a/ayatanawebmail/application.py+++ b/ayatanawebmail/application.py@@ -1102,12 +1102,15 @@ class AyatanaWebmail(object):
logger.error('"{0}:{1}" could not connect: {2}'.format(oConnection.strLogin, oConnection.strFolder, str(oException)))
+ oConnection.bConnecting = True+ GLib.timeout_add_seconds(1, oConnection.close)+ logger.info('"{0}:{1}" will try to reconnect in 1 minute.'.format(oConnection.strLogin, oConnection.strFolder))+ GLib.timeout_add_seconds(60, self.connect, [oConnection])+
oNotification = Notify.Notification.new(_('Connection error'), '', APPNAME)
- oNotification.set_property('body', _('Unable to connect to account "{accountName}", the application will now exit.').format(accountName=oConnection.strLogin))+ oNotification.set_property('body', _('Unable to connect to account "{accountName}", will try to reconnect in 1 minute.').format(accountName=oConnection.strLogin))
oNotification.set_hint('desktop-entry', GLib.Variant.new_string(APPNAME))
- oNotification.set_timeout(Notify.EXPIRES_NEVER)
oNotification.show()
- self.close(1)
return False
What do you think about this?
The text was updated successfully, but these errors were encountered:
Many moons ago, when this application was still fresh, I added this as a final catch for a case when it could not recover by simply reconnecting everything.
I really don't remember why the exit was needed back then (sorry).
Perhaps with all the code changes over the years, it is now possible to avoid exiting. We should really stress-test your proposal, and if it really works, merge it as a PR.
Currently, the application exits when one account could not connect to the mail server. Wouldn't it be better to run another connection attempt after a short time period?
I think of these kind of changes:
diff --git a/ayatanawebmail/application.py b/ayatanawebmail/application.py
index 917fb3b..c17c4c8 100755
--- a/ayatanawebmail/application.py+++ b/ayatanawebmail/application.py@@ -1102,12 +1102,15 @@ class AyatanaWebmail(object):
logger.error('"{0}:{1}" could not connect: {2}'.format(oConnection.strLogin, oConnection.strFolder, str(oException)))
+ oConnection.bConnecting = True+ GLib.timeout_add_seconds(1, oConnection.close)+ logger.info('"{0}:{1}" will try to reconnect in 1 minute.'.format(oConnection.strLogin, oConnection.strFolder))+ GLib.timeout_add_seconds(60, self.connect, [oConnection])+
oNotification = Notify.Notification.new(_('Connection error'), '', APPNAME)
- oNotification.set_property('body', _('Unable to connect to account "{accountName}", the application will now exit.').format(accountName=oConnection.strLogin))+ oNotification.set_property('body', _('Unable to connect to account "{accountName}", will try to reconnect in 1 minute.').format(accountName=oConnection.strLogin))
oNotification.set_hint('desktop-entry', GLib.Variant.new_string(APPNAME))
- oNotification.set_timeout(Notify.EXPIRES_NEVER)
oNotification.show()
- self.close(1)
return False
Currently, the application exits when one account could not connect to the mail server. Wouldn't it be better to run another connection attempt after a short time period?
I think of these kind of changes:
What do you think about this?
The text was updated successfully, but these errors were encountered: