it is possible to have a disconnectHandler colled during the con.connect() function if jabber server is brocken.
This commit is contained in:
parent
3a91cda882
commit
b5cf353af9
1 changed files with 1 additions and 1 deletions
|
@ -204,6 +204,7 @@ class GajimCore:
|
||||||
connection=common.xmlstream.TCP, port=5222, proxy = proxy)
|
connection=common.xmlstream.TCP, port=5222, proxy = proxy)
|
||||||
#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.setDisconnectHandler(self.disconnectedCB)
|
||||||
try:
|
try:
|
||||||
con.connect()
|
con.connect()
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
|
@ -224,7 +225,6 @@ class GajimCore:
|
||||||
con.registerHandler('message', self.messageCB)
|
con.registerHandler('message', self.messageCB)
|
||||||
con.registerHandler('presence', self.presenceCB)
|
con.registerHandler('presence', self.presenceCB)
|
||||||
con.registerHandler('iq',self.vCardCB,'result')#common.jabber.NS_VCARD)
|
con.registerHandler('iq',self.vCardCB,'result')#common.jabber.NS_VCARD)
|
||||||
con.setDisconnectHandler(self.disconnectedCB)
|
|
||||||
#BUG in jabberpy library : if hostname is wrong : "boucle"
|
#BUG in jabberpy library : if hostname is wrong : "boucle"
|
||||||
if con.auth(name, password, ressource):
|
if con.auth(name, password, ressource):
|
||||||
self.connexions[con] = account
|
self.connexions[con] = account
|
||||||
|
|
Loading…
Add table
Reference in a new issue