[dijjer-cvs] Dijjer/src/dijjer/io/xfer BlockReceiver.java,1.16,1.17
Brought to you by:
gnovos
|
From: Chris <ch...@us...> - 2005-09-14 06:04:51
|
Update of /cvsroot/dijjer/Dijjer/src/dijjer/io/xfer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15416/io/xfer Modified Files: BlockReceiver.java Log Message: Reduced the frequency of checks for missing packets and increase the time between re-requesting missing packets. Multiple missing packet notifications were probably leading to a lot of the unmatched packetTransmit messages. Index: BlockReceiver.java =================================================================== RCS file: /cvsroot/dijjer/Dijjer/src/dijjer/io/xfer/BlockReceiver.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** BlockReceiver.java 25 Aug 2005 23:40:24 -0000 1.16 --- BlockReceiver.java 14 Sep 2005 06:04:44 -0000 1.17 *************** *** 83,86 **** --- 83,90 ---- // Remove it from rrmp if its in there _recentlyReportedMissingPackets.remove(new Integer(packetNo)); + // Skip checks except for 1 out of 16 packets until we get to the end + if ((_prb.numReceived() < (_prb.getNumPackets() - 16)) + && (packetNo % 16 != 0)) + continue; // Check that we have what the sender thinks we have LinkedList missing = new LinkedList(); *************** *** 94,98 **** // based on the number of other packets we are already waiting for long resendWait = System.currentTimeMillis() ! + (MAX_ROUND_TRIP_TIME + (_recentlyReportedMissingPackets.size() * MAX_SEND_INTERVAL)); _recentlyReportedMissingPackets.put(new Integer(x), (new Long(resendWait))); missing.add(new Integer(x)); --- 98,102 ---- // based on the number of other packets we are already waiting for long resendWait = System.currentTimeMillis() ! + (10*MAX_ROUND_TRIP_TIME + (_recentlyReportedMissingPackets.size() * MAX_SEND_INTERVAL)); _recentlyReportedMissingPackets.put(new Integer(x), (new Long(resendWait))); missing.add(new Integer(x)); |