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

prevent traceback when going offline while a jingle session is active

parent 8305f6d6
No related branches found
No related tags found
No related merge requests found
......@@ -672,9 +672,10 @@ class JingleSession(object):
def __content_remove(self, content, reason=None):
assert self.state != JingleStates.ended
stanza, jingle = self.__make_jingle('content-remove', reason=reason)
self.__append_content(jingle, content)
self.connection.connection.send(stanza)
if self.connection.connection and self.connection.connected > 1:
stanza, jingle = self.__make_jingle('content-remove', reason=reason)
self.__append_content(jingle, content)
self.connection.connection.send(stanza)
# TODO: this will fail if content is not an RTP content
gajim.nec.push_incoming_event(JingleDisconnectedReceivedEvent(None,
conn=self.connection, jingle_session=self, media=content.media,
......
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