You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a XMPP Client with your library to connect it with a XMPP OpenFire Server that has a very heavy workload...
I known that when your Client is connecting with the Server and the socket is connected, your Client wait for the first Stanza from the Server to start the XMPP Session. But sometimes the Client is blocked for a very long time, even for days, without my Server sending the Stanza neither closing the connection.
In this case your Client library there isn't a timeout, and the KeepAlive timer won't begin until this first Stanza start the session
I fixed the problem changing your QXmppOutgoingClient Client class as follows:
// Begin KeepAlive when the socket is connected and not when the XMPP session is started ->
// There is a problem: sometimes when the socket is connected, the server does not send the first stanza neither broke the connection
// The process can be blocked for days
//
// check = connect(this, SIGNAL(connected()),
// this, SLOT(pingStart()));
// Q_ASSERT(check);
//JCP *** Begin KeepAlive when the socket is connected and not when the xmpp session is started ->
// There is a problem when the socket is connected and the server does not send the first stanza neither broke the connection
// The process can be blocked for days
info(QString("Patch Start keep alive when socket connected"));
pingStop();
pingStart();
}
Because the handleStart() slot is called when the socket is connected, now I'm starting the keepAlive timer without waiting for the session starting and It has fixed my problem
What do you think about this approach?. Is there any problem for doing that?. Do you have a better approach for this problem?
Thanks in advanced
Regards:
JCP
The text was updated successfully, but these errors were encountered:
Hello:
I'm developing a XMPP Client with your library to connect it with a XMPP OpenFire Server that has a very heavy workload...
I known that when your Client is connecting with the Server and the socket is connected, your Client wait for the first Stanza from the Server to start the XMPP Session. But sometimes the Client is blocked for a very long time, even for days, without my Server sending the Stanza neither closing the connection.
In this case your Client library there isn't a timeout, and the KeepAlive timer won't begin until this first Stanza start the session
I fixed the problem changing your QXmppOutgoingClient Client class as follows:
QXmppOutgoingClient::QXmppOutgoingClient(QObject *parent)
: QXmppStream(parent),
d(new QXmppOutgoingClientPrivate(this))
{
-----------------------------------------
}
/// \cond
void QXmppOutgoingClient::handleStart()
{
// The process can be blocked for days
info(QString("Patch Start keep alive when socket connected"));
pingStop();
pingStart();
}
Because the handleStart() slot is called when the socket is connected, now I'm starting the keepAlive timer without waiting for the session starting and It has fixed my problem
What do you think about this approach?. Is there any problem for doing that?. Do you have a better approach for this problem?
Thanks in advanced
Regards:
JCP
The text was updated successfully, but these errors were encountered: