Y! will barf on really slow connection
Brought to you by:
wtanaka
This bug was introduced when
http://sf.net/tracker/?func=detail&aid=203837&group_id=2302&atid=102302
was fixed.
Details to follow.
Logged In: YES
user_id=11717
This change:
Checking in wtanaka/net/Socket.java;
/cvsroot/praya/praya/wtanaka/net/Socket.java,v <-- Socket.java
new revision: 1.2; previous revision: 1.1
done
Checking in wtanaka/praya/yahoo/YahooClient.java;
/cvsroot/praya/praya/wtanaka/praya/yahoo/YahooClient.java,v
<-- YahooClient.java
new revision: 1.48; previous revision: 1.47
done
Checking in wtanaka/praya/yahoo/YahooReadThread.java;
/cvsroot/praya/praya/wtanaka/praya/yahoo/YahooReadThread.java,v
<-- YahooReadThread.java
new revision: 1.2; previous revision: 1.1
done
introduced a timing bug in YahooClient. The bug will
trigger as follows:
1) YahooReadThread calls RawPacketInputStream.readPacket()
2) Some data comes in, but not the whole packet
3) YahooClient.SO_TIMEOUT elapses
4) YahooReadThread continues, and starts readPacket() again
in the middle of the previously pending packet.
and thus loses synchronization with the stream.
Logged In: YES
user_id=11717
I'm not sure what behavior will ensue, but the fix is
something like follows:
1) Create wtanaka.net.SocketInputStream, referred to as
"wnS" for short below
2) add method wnS.read() which will poll
Thread.interrupted() using SO_TIMEOUT and throw a
InterruptedIOException if interrupted() ever becomes
true.
3) back out change made to Socket, YahooClient and
YahooReadThread referred to at 2001-09-23 18:30