prevent traceback when disconnecting while a jingle session is active.
This commit is contained in:
		
							parent
							
								
									262cad2d99
								
							
						
					
					
						commit
						f6e45c18ef
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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'):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue