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:
parent
e7e88cd701
commit
894e38cc7f
|
@ -517,6 +517,7 @@ class Connection:
|
||||||
con = common.xmpp.Client(hostname, debug = [])
|
con = common.xmpp.Client(hostname, debug = [])
|
||||||
#debug = [common.jabber.DBG_ALWAYS], log = sys.stderr, \
|
#debug = [common.jabber.DBG_ALWAYS], log = sys.stderr, \
|
||||||
#connection=common.xmlstream.TCP_SSL, port=5223, proxy = proxy)
|
#connection=common.xmlstream.TCP_SSL, port=5223, proxy = proxy)
|
||||||
|
con.UnregisterDisconnectHandler(con.DisconnectHandler)
|
||||||
con.RegisterDisconnectHandler(self._disconnectedCB)
|
con.RegisterDisconnectHandler(self._disconnectedCB)
|
||||||
try:
|
try:
|
||||||
c = con.connect(proxy=proxy, tls=usetls) #FIXME: blocking
|
c = con.connect(proxy=proxy, tls=usetls) #FIXME: blocking
|
||||||
|
|
Loading…
Reference in New Issue