Philipp Hörist pushed to branch master at gajim / gajim
Commits:
5fd1e7b4 by Philipp Hörist at 2019-01-03T23:49:59Z
Remove ping timeout on disconnect handler
- - - - -
2 changed files:
- gajim/common/connection.py
- gajim/common/modules/ping.py
Changes:
=====================================
gajim/common/connection.py
=====================================
@@ -675,6 +675,7 @@ class Connection(CommonConnection, ConnectionHandlers):
def _disconnect(self):
log.info('Set state disconnected')
+ self.get_module('Ping').remove_timeout()
self.connected = 0
self.disable_reconnect_timer()
=====================================
gajim/common/modules/ping.py
=====================================
@@ -66,10 +66,8 @@ class Ping:
self.remove_timeout()
def _reconnect(self) -> None:
- if not app.config.get_per('accounts', self._account, 'active'):
- # Account may have been disabled
+ if not app.account_is_connected(self._account):
return
-
# We haven't got the pong in time, disco and reconnect
log.warning('No reply received for keepalive ping. Reconnecting...')
self._con.disconnect(immediately=True)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/5fd1e7b4bfb61e6f983dfaa25a4de6b639…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/5fd1e7b4bfb61e6f983dfaa25a4de6b639…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
aa44a60c by Philipp Hörist at 2019-01-03T23:19:00Z
Fix tests
- - - - -
1 changed file:
- test/unit/test_xmpp_dispatcher_nb.py
Changes:
=====================================
test/unit/test_xmpp_dispatcher_nb.py
=====================================
@@ -47,17 +47,17 @@ class TestDispatcherNB(unittest.TestCase):
self.dispatcher.RegisterHandler('message', _got_message)
# should be able to parse a normal message
- self.dispatcher.ProcessNonBlocking('<message><body>hello</body></message>')
+ self.dispatcher.ProcessNonBlocking('<message from="test(a)test.at"><body>hello</body></message>')
self.assertEqual(1, len(msgs))
- self.dispatcher.ProcessNonBlocking('<message><x:y/></message>')
+ self.dispatcher.ProcessNonBlocking('<message from="test(a)test.at"><x:y/></message>')
self.assertEqual(2, len(msgs))
# we should not have been disconnected after that message
self.con.pollend.assert_not_called()
self.con.disconnect.assert_not_called()
# we should be able to keep parsing
- self.dispatcher.ProcessNonBlocking('<message><body>still here?</body></message>')
+ self.dispatcher.ProcessNonBlocking('<message from="test(a)test.at"><body>still here?</body></message>')
self.assertEqual(3, len(msgs))
def test_process_non_blocking(self):
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/aa44a60c7833fa9f97776a37c3…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/aa44a60c7833fa9f97776a37c3…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
b37c5785 by Philipp Hörist at 2019-01-02T01:27:38Z
Fix tests
- Fix more pylint errors
- Move caps test for now to broken
- - - - -
2 changed files:
- gajim/common/connection_handlers_events.py
- test/no_gui/unit/test_protocol_caps.py → test/broken/no_gui/test_protocol_caps.py
Changes:
=====================================
gajim/common/connection_handlers_events.py
=====================================
@@ -18,7 +18,6 @@
# pylint: disable=attribute-defined-outside-init
import logging
-from time import time as time_time
import OpenSSL.crypto
import nbxmpp
@@ -30,8 +29,6 @@ from gajim.common import i18n
from gajim.common.i18n import _
from gajim.common.helpers import AdditionalDataDict
from gajim.common.modules import dataforms
-from gajim.common.modules.misc import parse_idle
-from gajim.common.modules.misc import parse_delay
from gajim.common.const import KindConstant, SSLError
from gajim.common.jingle_transport import JingleTransportSocks5
from gajim.common.file_props import FilesProp
=====================================
test/no_gui/unit/test_protocol_caps.py → test/broken/no_gui/test_protocol_caps.py
=====================================
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b37c578504cb930f55916074c0593a7b78…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/b37c578504cb930f55916074c0593a7b78…
You're receiving this email because of your account on dev.gajim.org.