Skip to content
Snippets Groups Projects
Commit f6e45c18 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent traceback when disconnecting while a jingle session is active.

parent 262cad2d
No related branches found
No related tags found
No related merge requests found
......@@ -625,7 +625,8 @@ class JingleSession(object):
assert self.state != JingleStates.ended
stanza, jingle = self.__make_jingle('session-terminate', reason=reason)
self.__broadcast_all(stanza, jingle, None, 'session-terminate-sent')
self.connection.connection.send(stanza)
if self.connection.connection and self.connection.connected >= 2:
self.connection.connection.send(stanza)
# TODO: Move to GUI?
reason, text = self.__reason_from_stanza(jingle)
if reason not in ('success', 'cancel', 'decline'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment