Update of /cvsroot/freenet/freenet/src/freenet/node/states/request
In directory sc8-pr-cvs1:/tmp/cvs-serv15081/src/freenet/node/states/request
Modified Files:
Pending.java SendFinished.java
Log Message:
6237:
If we close a trailer while still sending a trailer chunk, this is an error. Report it
with a stack trace. This caused the send failed, valid key errors - this will help
track down the real source.
Execute messages on states on the selector loop thread, if the message is going to run
really fast (otherwise schedule it on the ticker anyway). Currently only used by
SendFinished.
Index: Pending.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/Pending.java,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- Pending.java 13 Oct 2003 11:11:13 -0000 1.71
+++ Pending.java 14 Oct 2003 00:43:14 -0000 1.72
@@ -641,6 +641,19 @@
// No timeout for the actual send
}
+ public boolean canRunFast(Node n, MessageObject mo) {
+ if(mo instanceof SendFinished) {
+ SendFinished sf = (SendFinished)mo;
+ if(sf == feedbackSender) return true;
+ if(sf == outwardSender) {
+ if(sf.getSuccess()) return true;
+ else return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
public void receivedSendFinished(Node n, SendFinished sf)
throws BadStateException, RequestAbortException, EndOfRouteException {
// If not finished, timed out
Index: SendFinished.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/SendFinished.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SendFinished.java 4 Oct 2003 01:17:06 -0000 1.8
+++ SendFinished.java 14 Oct 2003 00:43:14 -0000 1.9
@@ -71,7 +71,7 @@
if(n.logger.shouldLog(Logger.DEBUG,this))
n.logger.log(this, toString() + " succeeded",
Logger.DEBUG);
- n.schedule(this);
+ n.schedule(this, true);
}
public void thrown(Exception e) {
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs