summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorTom Nichols <tmnichols@gmail.com>2010-05-12 16:51:14 -0400
committerTom Nichols <tmnichols@gmail.com>2010-05-12 16:51:14 -0400
commit7552efee5c6d974087bc6883a5613d093ffd8bdc (patch)
tree0d6a09f011e70420caaa952141890c6925c6e5a7 /sleekxmpp/xmlstream/xmlstream.py
parent6bc6ebb95dedd6717fc9e2c4f8e0f9eadcaf80b5 (diff)
downloadslixmpp-7552efee5c6d974087bc6883a5613d093ffd8bdc.tar.gz
slixmpp-7552efee5c6d974087bc6883a5613d093ffd8bdc.tar.bz2
slixmpp-7552efee5c6d974087bc6883a5613d093ffd8bdc.tar.xz
slixmpp-7552efee5c6d974087bc6883a5613d093ffd8bdc.zip
some reconnetion fixes
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 025884b7..810be295 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -146,13 +146,19 @@ class XMLStream(object):
def process(self, threaded=True):
for t in range(0, HANDLER_THREADS):
- self.__thread['eventhandle%s' % t] = threading.Thread(name='eventhandle%s' % t, target=self._eventRunner)
- self.__thread['eventhandle%s' % t].start()
- self.__thread['sendthread'] = threading.Thread(name='sendthread', target=self._sendThread)
- self.__thread['sendthread'].start()
+ th = threading.Thread(name='eventhandle%s' % t, target=self._eventRunner)
+ th.setDaemon(True)
+ self.__thread['eventhandle%s' % t] = th
+ th.start()
+ th = threading.Thread(name='sendthread', target=self._sendThread)
+ th.setDaemon(True)
+ self.__thread['sendthread'] = th
+ th.start()
if threaded:
- self.__thread['process'] = threading.Thread(name='process', target=self._process)
- self.__thread['process'].start()
+ th = threading.Thread(name='process', target=self._process)
+ th.setDaemon(True)
+ self.__thread['process'] = th
+ th.start()
else:
self._process()
@@ -286,7 +292,7 @@ class XMLStream(object):
self.state.set('tls',False)
self.state.set('ssl',False)
time.sleep(1)
- self.connect()
+ self.connect(self.server,self.port)
def incoming_filter(self, xmlobj):
return xmlobj