Blob Blame History Raw
--- xmpp/transports.py~	2007-09-15 15:34:28.000000000 +0400
+++ xmpp/transports.py	2009-03-15 11:49:08.812623324 +0300
@@ -12,7 +12,7 @@
 ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ##   GNU General Public License for more details.
 
-# $Id: transports.py,v 1.31 2007/09/15 11:34:28 normanr Exp $
+# $Id: transports.py,v 1.32 2008/01/04 11:32:53 normanr Exp $
 
 """
 This module contains the low-level implementations of xmpppy connect methods or
@@ -181,7 +181,8 @@
             # Avoid printing messages that are empty keepalive packets.
             if raw_data.strip():
                 self.DEBUG(raw_data,'sent')
-                self._owner.Dispatcher.Event('', DATA_SENT, raw_data)
+                if hasattr(self._owner, 'Dispatcher'): # HTTPPROXYsocket will send data before we have a Dispatcher
+                    self._owner.Dispatcher.Event('', DATA_SENT, raw_data)
         except:
             self.DEBUG("Socket error while sending data",'error')
             self._owner.disconnected()