diff --git a/data/default_config.cfg b/data/default_config.cfg index 35bc498b..e5e8278b 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -73,7 +73,7 @@ ca_cert_path = # Auto-reconnects you when you get disconnected from the server # defaults to false because it should not be necessary -auto_reconnect = false +auto_reconnect = true # The time between the ping sent to the server to check if the connection is alive connection_check_interval = 60 diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index d0ff5bbe..b8f2e8ae 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -220,10 +220,10 @@ well, but you will at least want to know when you get disconnected. auto_reconnect - **Default value:** ``false`` + **Default value:** ``true`` - Auto-reconnects you when you get disconnected. Should not be necessary, so - the default is false. + Auto-reconnects you when you get disconnected from the + server. Poezio will try to reconnect forever, until it succeeds. connection_check_interval diff --git a/src/config.py b/src/config.py index 1f0771ca..563c16be 100644 --- a/src/config.py +++ b/src/config.py @@ -28,7 +28,7 @@ DEFAULT_CONFIG = { 'add_space_after_completion': True, 'after_completion': ',', 'alternative_nickname': '', - 'auto_reconnect': False, + 'auto_reconnect': True, 'autorejoin_delay': '5', 'autorejoin': False, 'beep_on': 'highlight private invite', diff --git a/src/core/handlers.py b/src/core/handlers.py index d8f057f8..dc6238d5 100644 --- a/src/core/handlers.py +++ b/src/core/handlers.py @@ -855,7 +855,7 @@ def on_disconnected(self, event): for tab in self.get_tabs(tabs.MucTab): tab.disconnect() self.information(_("Disconnected from server."), _('Error')) - if not self.legitimate_disconnect and config.get('auto_reconnect', False): + if not self.legitimate_disconnect and config.get('auto_reconnect', True): self.information(_("Auto-reconnecting."), _('Info')) self.xmpp.connect()