[gdr_gdr] Prevent traceback. Fixes #8265

This commit is contained in:
Yann Leboulanger 2016-02-20 21:16:16 +01:00
parent 1316866265
commit 7740f8ccf4
1 changed files with 3 additions and 2 deletions

View File

@ -199,8 +199,9 @@ class ConnectionBytestream:
if not self.connection or self.connected < 2:
return
if file_props.session_type == 'jingle':
jingle = self._sessions[file_props.sid]
jingle.cancel_session()
if file_props.sid in self._sessions:
jingle = self._sessions[file_props.sid]
jingle.cancel_session()
return
iq = nbxmpp.Iq(to=file_props.sender, typ='error')
iq.setAttr('id', file_props.request_id)