Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Yann Leboulanger
gajim
Commits
4f1a3a32
Commit
4f1a3a32
authored
Oct 05, 2018
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resume after sm timeout
Fixes #9364
parent
84ba852a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
gajim/common/connection.py
gajim/common/connection.py
+12
-1
No files found.
gajim/common/connection.py
View file @
4f1a3a32
...
...
@@ -715,9 +715,20 @@ class Connection(CommonConnection, ConnectionHandlers):
title
=
_
(
'Connection with account "%s" has been lost'
)
%
self
.
name
,
msg
=
_
(
'Reconnect manually.'
)))
def
_on_resume_failed
(
self
):
# SM resume failed, set all MUCs offline
# and lose the presence state of all contacts
app
.
nec
.
push_incoming_event
(
OurShowEvent
(
None
,
conn
=
self
,
show
=
'offline'
))
def
_event_dispatcher
(
self
,
realm
,
event
,
data
):
CommonConnection
.
_event_dispatcher
(
self
,
realm
,
event
,
data
)
if
realm
==
nbxmpp
.
NS_REGISTER
:
if
realm
==
nbxmpp
.
NS_STREAM_MGMT
:
if
event
==
'RESUME FAILED'
:
log
.
info
(
'Resume failed'
)
self
.
_on_resume_failed
()
elif
realm
==
nbxmpp
.
NS_REGISTER
:
if
event
==
nbxmpp
.
features_nb
.
REGISTER_DATA_RECEIVED
:
# data is (agent, DataFrom, is_form, error_msg)
if
self
.
new_account_info
and
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment