Commit 2bd26e7e authored by David Faure's avatar David Faure
Browse files

Fix wrong timeout when uploading/downloading large messages.

This fix requires the ktcpsocket encryptedBytesWritten signal added to kdelibs-4.8[.1?]

CCBUGS: 258271, 258361, 258378
parent 83477727
......@@ -369,6 +369,11 @@ void SessionPrivate::socketDisconnected()
clearJobQueue();
}
void SessionPrivate::socketActivity()
{
restartSocketTimer();
}
void SessionPrivate::socketError()
{
if (socketTimer.isActive()) {
......
......@@ -143,6 +143,7 @@ class KIMAP_EXPORT Session : public QObject
Q_PRIVATE_SLOT( d, void socketConnected() )
Q_PRIVATE_SLOT( d, void socketDisconnected() )
Q_PRIVATE_SLOT( d, void socketError() )
Q_PRIVATE_SLOT( d, void socketActivity() )
Q_PRIVATE_SLOT( d, void handleSslError( const KSslErrorUiData &errorData ) )
......
......@@ -80,6 +80,7 @@ class KIMAP_EXPORT SessionPrivate : public QObject
void socketConnected();
void socketDisconnected();
void socketError();
void socketActivity();
void startSocketTimer();
void stopSocketTimer();
......
......@@ -162,7 +162,14 @@ void SessionThread::run()
m_session, SLOT(socketConnected()) );
connect( m_socket, SIGNAL(error(KTcpSocket::Error)),
m_session, SLOT(socketError()) );
connect( m_socket, SIGNAL(bytesWritten(qint64)),
m_session, SLOT(socketActivity()) );
if ( m_socket->metaObject()->indexOfSignal("encryptedBytesWritten(qint64)" ) > -1 ) {
connect( m_socket, SIGNAL(encryptedBytesWritten(qint64)), // needs kdelibs > 4.8
m_session, SLOT(socketActivity()) );
}
connect( m_socket, SIGNAL(readyRead()),
m_session, SLOT(socketActivity()) );
connect( this, SIGNAL(responseReceived(KIMAP::Message)),
m_session, SLOT(responseReceived(KIMAP::Message)) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment