[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.5/kdenetwork/kopete/libkopete
From:       Roman Jarosz <kedgedev () gmail ! com>
Date:       2010-07-30 19:26:44
Message-ID: 20100730192644.35234AC782 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1157350 by rjarosz:

Backport commit 1157349.
Fix bug 246156, kopete connection timeout around every 3 minutes                      \
 Patch by Ike Devolder, thanks.                                                       \
                
                                                                                      \
                
CCBUG: 246156  



 M  +5 -5      kopetesockettimeoutwatcher.cpp  


--- branches/KDE/4.5/kdenetwork/kopete/libkopete/kopetesockettimeoutwatcher.cpp \
#1157349:1157350 @@ -91,18 +91,18 @@
 		int info_length = sizeof(info);
 		if ( getsockopt( sDesc, SOL_TCP, TCP_INFO, (void*)&info, (socklen_t*)&info_length \
) == 0 )  {
-			if ( info.tcpi_last_ack_recv >= info.tcpi_last_data_sent && \
(info.tcpi_last_ack_recv - info.tcpi_last_data_sent) > mTimeoutThreshold ) +			if ( \
info.tcpi_last_ack_recv < info.tcpi_last_data_sent || info.tcpi_last_data_sent <= 0 ) \
{ +				mAckCheckTimer->stop();
+			}
+			else if ( info.tcpi_last_ack_recv >= info.tcpi_last_data_sent && \
(info.tcpi_last_ack_recv - info.tcpi_last_data_sent) > mTimeoutThreshold ) +			{
 				kWarning() << "Connection timeout for " << mSocket->peerAddress();
 				mAckCheckTimer->stop();
 				emit error( QAbstractSocket::RemoteHostClosedError );
 				emit errorInt( QAbstractSocket::RemoteHostClosedError );
 				mSocket->abort();
 			}
-			else if ( info.tcpi_last_ack_recv < info.tcpi_last_data_sent )
-			{
-				mAckCheckTimer->stop();
-			}
 			return;
 		}
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic