bot reconnection after disconnect
From: Paweł Buńko <p.bunko@xxxxxxxxxxxx>
Date: Tue, 18 Dec 2007 21:17:35 +0100 (CET)
hello,

I'm writing a bot

Client initialization:

JID jid(m_TerminalServerConfiguration->GetJabberUser());
m_jabberClient = new Client(jid, m_TerminalServerConfiguration->GetJabberUserPassword());
m_jabberClient->registerConnectionListener(this);
m_jabberClient->registerMessageHandler(this);
m_jabberClient->registerPresenceHandler(this);

m_jabberClient->setPresence(PresenceAvailable, 5);
m_jabberClient->registerIqHandler(this, "jabber:iq:roster");
m_jabberClient->logInstance().registerLogHandler(LogLevelDebug, LogAreaAll, this); m_jabberClient->disco()->setVersion("TerminalServer", GLOOX_VERSION, "Linux");
m_jabberClient->disco()->setIdentity("client", "bot" );
m_jabberClient->connect();

after disconnet -> onDisconnect event I'm trying to reconnect by m_jabberClient->connect() after this function nothing happend I can only see in logs: <?xml version='1.0' ?><stream:stream to='jabber.autocontrol.pl' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
and no reconnection :(

another problem if I registe IqHandler, my client doesn't receive events from ConnectionListener and It even doesn't change its presence status to available. What is wrong? Iif I delete IqHandler registration everything works fine

--
Paweł Buńko
Programista
Dział Rozwoju Produktów
AutoGuard S.A.

NIP: 113-22-19-747
Sąd Rejonowy dla m.st. Warszawy, XIII Wydział Gospodarczy Krajowego Rejestru 
Sądowego
KRS: 0000287629
Kapitał akcyjny: 1.059.000 PLN

e-mail: p.bunko@xxxxxxxxxxxx
phone: +48 22 611 69 23
mobile: +48 502 477 791

Tlen.pl: pawlin_b
GG: #1692409
Skype: pawlin

www.autoguard.pl