check if connection is active before sending something.
This commit is contained in:
parent
99f8a9cbb9
commit
2f857047d3
|
@ -487,7 +487,7 @@ class CommandWindow:
|
|||
def send_cancel(self):
|
||||
'''Send the command with action='cancel'. '''
|
||||
assert self.commandnode is not None
|
||||
if self.sessionid is not None:
|
||||
if self.sessionid is not None and self.account.connection:
|
||||
# we already have sessionid, so the service sent at least one reply.
|
||||
stanza = xmpp.Iq(typ='set', to=self.jid)
|
||||
stanza.addChild('command', attrs={
|
||||
|
|
Loading…
Reference in New Issue