Update of /cvsroot/freenet/freenet/src/freenet In directory sc8-pr-cvs1:/tmp/cvs-serv3206/src/freenet
Modified Files: ConnectionHandler.java Log Message: fix braino, some questions Index: ConnectionHandler.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v retrieving revision 1.147 retrieving revision 1.148 diff -u -r1.147 -r1.148 --- ConnectionHandler.java 8 Sep 2003 05:39:20 -0000 1.147 +++ ConnectionHandler.java 8 Sep 2003 05:50:11 -0000 1.148 @@ -890,16 +890,19 @@ // Open new conn if necessary if(identity != null && ocm.findFreeConnection(identity) == null) - Main.node.scheduleConnectionOpener(identity); //this is an overkill --zab + Main.node.scheduleConnectionOpener(identity); //this is an overkill + //shouldn't it also happen _after_ reducing the counters? --zab //we should check the status if terminate() is called from elsewhere if (!status) { //tell everybody they failed //this is where the PeerHandler will really help - Iterator i = sendingQueue.iterator(); - while (i.hasNext()) { - MessageSend current = (MessageSend) i.next(); - current.jobDone(0,false); + synchronized(sendingQueue) { + Iterator i = sendingQueue.iterator(); + while (i.hasNext()) { + MessageSend current = (MessageSend) i.next(); + current.jobDone(0,false); + } } //FIXME: we also need to iterate through the current packet //not sure exactly how to do that. @@ -2581,7 +2584,7 @@ } if(logDEBUG) logDEBUG("notified CHOS in terminate()"); //if(currentSender != null) - jobDone(0, false); //call jobDone for the entire CH --zab + if(logDEBUG) logDEBUG("notified current sender in terminate()"); //terminatedInstances++; if (!sendClosed.state()) @@ -2599,6 +2602,7 @@ receiveLock.notify(); } if(logDEBUG) logDEBUG("changed and notified receiveClosed/receiveLock in terminate()"); + jobDone(0, false); //call jobDone for the entire CH --zab if(!wasClosed) { try { Link l = link; _______________________________________________ cvs mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs