summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-03-13 18:46:02 +0100
committermathieui <mathieui@mathieui.net>2012-03-13 18:46:02 +0100
commit27a7bfc92ce96af5ae08e2edd78a146287997c85 (patch)
tree7bd4605285ef9bab27d992f05edf47effcdccbae /src
parent6d2af1116cf08feea1611e9cc27df4205e4c4fbd (diff)
downloadpoezio-27a7bfc92ce96af5ae08e2edd78a146287997c85.tar.gz
poezio-27a7bfc92ce96af5ae08e2edd78a146287997c85.tar.bz2
poezio-27a7bfc92ce96af5ae08e2edd78a146287997c85.tar.xz
poezio-27a7bfc92ce96af5ae08e2edd78a146287997c85.zip
Add a whitespace_interval option
Diffstat (limited to 'src')
-rw-r--r--src/connection.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/connection.py b/src/connection.py
index 0e92755f..6ffa1cf7 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -45,6 +45,11 @@ class Connection(sleekxmpp.ClientXMPP):
self.auto_reconnect = True if config.get('auto_reconnect', 'false').lower() in ('true', '1') else False
self.auto_authorize = None
self.ca_certs = config.get('ca_cert_path', '') or None
+ interval = config.get('whitespace_interval', '300')
+ if interval.isnumeric():
+ self.whitespace_keepalive_interval = int(interval)
+ else:
+ self.whitespace_keepalive_interval = 300
self.register_plugin('xep_0030')
self.register_plugin('xep_0004')
self.register_plugin('xep_0045')