[dijjer-cvs] Dijjer/src/dijjer/io/comm Dispatcher.java,1.59,1.60
Brought to you by:
gnovos
|
From: Chris <ch...@us...> - 2005-09-14 06:01:22
|
Update of /cvsroot/dijjer/Dijjer/src/dijjer/io/comm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14967/io/comm Modified Files: Dispatcher.java Log Message: Don't pick the same peer all the time if we didn't get a response. Index: Dispatcher.java =================================================================== RCS file: /cvsroot/dijjer/Dijjer/src/dijjer/io/comm/Dispatcher.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Dispatcher.java 12 Apr 2005 13:04:18 -0000 1.59 --- Dispatcher.java 14 Sep 2005 06:01:14 -0000 1.60 *************** *** 225,229 **** return true; } ! Peer best; HashSet exclude = new HashSet(); // We don't want to bother the seed with // requests for data --- 225,230 ---- return true; } ! Peer best = null; ! Peer last = null; HashSet exclude = new HashSet(); // We don't want to bother the seed with // requests for data *************** *** 269,273 **** --- 270,276 ---- // No response in 4 seconds, flag this guy to be recontacted and continue the while loop to find another // or possibly just download it ourselves + if (best == last) exclude.add(best); _rt.recontactPeer(best); + exclude.add(best); continue; } |