Bug 212855 - kopete disconnected from yahoo every 10 minutes
Summary: kopete disconnected from yahoo every 10 minutes
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Yahoo Plugin (other bugs)
Version First Reported In: 0.80.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 03:39 UTC by alexander.pshenichnikov
Modified: 2010-01-24 04:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
patch for yahoo protocol library (661 bytes, patch)
2009-11-25 05:37 UTC, alexander.pshenichnikov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.pshenichnikov 2009-11-03 03:39:43 UTC
Version:           0.80.2 (using KDE 4.3.2)
Compiler:          gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) 
OS:                Linux
Installed from:    Fedora RPMs

Yahoo sever reset connection after 10 minutes inactivity timeout, then kopete automatically reconnects within several seconds. Looks like yahoo brakes TCP/IP connection if there are no packets sent from the client during 10 minutes.
I found native Yahoo! Messenger sends "keep alive" messages every minute. Kopete does not do it.
Comment 1 alexander.pshenichnikov 2009-11-25 05:37:28 UTC
Created attachment 38562 [details]
patch for yahoo protocol library

Yahoo protocol implementation uses one hour "ping" timeout. Actually it's too long, we get disconnected after 10 minutes! This patch is for kopete/protocols/yahoo/libkyahoo/client.cpp. Just changed timeout value from one hour to one minute. It helps in my case.
Comment 2 Michael Cole 2010-01-21 10:39:29 UTC
This is a real bug..

Ok what i have discovered we send what is called a ping, actually its an alive statement to the server which Yahoo expects every so often, it does not have to be sent every minute but the Yahoo Client Version 10 sends it every minute.

There is an actual Ping message which can be captured if you are very patient and wait, it is sent every hour from the Yahoo Client. 

If Yahoo does not receive this it sends a disconnect notice to the client.

I am now testing a mod which sends both the Ping and the Alive message..
Comment 3 Michael Cole 2010-01-21 14:42:01 UTC
The new code has been uploaded to the trunk and can be tested I have tested it and myself i am no longer getting disconnect notices from the yahoo service..
Comment 4 Matt Rogers 2010-01-24 04:51:48 UTC
SVN commit 1079333 by mattr:

BUG: 212855
BUG: 156296
Added two files for the fix.
protocols/yahoo/libkyahoo/alivetask.h
protocols/yahoo/libkyahoo/alivetask.cpp

The code from ping.h and cpp now actually resides in those files,
and the ping task actually sends the ping not the alive message,
Alive messages are sent to keep communcation between Yahoo and the client,
but the Ping keeps you connected to the service so as they dont send a disconnect after the hour.

I have set the time out to 59 minutes for the alive and the alive to 1 minute.

 M  +2 -1      CMakeLists.txt  
 A             alivetask.cpp   pingtask.cpp#1079332 [License: LGPL (v2+)]
 A             alivetask.h   pingtask.cpp#1079332 [License: LGPL (v2+)]
 M  +20 -3     client.cpp  
 M  +6 -0      client.h  
 M  +1 -2      pingtask.cpp  
 M  +1 -1      ymsgprotocol.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1079333