prevent a traceback. fixes #3202

This commit is contained in:
Yann Leboulanger 2007-06-01 19:49:21 +00:00
parent 578654b4c8
commit c2825a83f7
1 changed files with 2 additions and 0 deletions

View File

@ -632,6 +632,8 @@ class Connection(ConnectionHandlers):
self.connection.send(iq) self.connection.send(iq)
def send_invisible_presence(self, msg, signed, initial = False): def send_invisible_presence(self, msg, signed, initial = False):
if not self.connection:
return
# try to set the privacy rule # try to set the privacy rule
iq = self.build_privacy_rule('invisible', 'deny') iq = self.build_privacy_rule('invisible', 'deny')
self.connection.SendAndCallForResponse(iq, self._continue_invisible, self.connection.SendAndCallForResponse(iq, self._continue_invisible,