client.DisconnectHandler is no more called, so no TB will be raised when disconected

so no need to embrace every "send" call in try: except: block
This commit is contained in:
Yann Leboulanger 2005-05-20 10:49:46 +00:00
parent e7e88cd701
commit 894e38cc7f
1 changed files with 1 additions and 0 deletions

View File

@ -517,6 +517,7 @@ class Connection:
con = common.xmpp.Client(hostname, debug = [])
#debug = [common.jabber.DBG_ALWAYS], log = sys.stderr, \
#connection=common.xmlstream.TCP_SSL, port=5223, proxy = proxy)
con.UnregisterDisconnectHandler(con.DisconnectHandler)
con.RegisterDisconnectHandler(self._disconnectedCB)
try:
c = con.connect(proxy=proxy, tls=usetls) #FIXME: blocking