Update of /cvsroot/freenet/freenet/src/freenet/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv11480/src/freenet/transport
Modified Files:
Tag: ngrouting
AbstractSelectorLoop.java
Log Message:
Build 7046:
Main objectives of this build are to improve routing success stats, fix deadlocks and
fix RNFs.
Major ASL bugfix: fix race that could lead to connections getting closed without the
client being notified.
MAJOR *SL work: Zab fixed some *SL deadlocks.
Change logging of success/failure of Routing, to take into account whether or not the
failure was apparently caused by routing. Add new diagnostic vars
requestFailureRoutingOrNotRatio, routingSuccessRatio. Change and consolidate
terminate() calls all over request/. Minor changes all over states/request: Set
insertReplyTime *before* sending it on, comment out logFailure*/logSuccess, update
comments, logging, move *Time assignment after fromLastPeer check in
receivedQueryRestarted (conceivably exploitable to bias stats), make backtracking
QueryRejected async in Pending, make sure IOExceptions from the store are treated
differently to IOExceptions from the network (which are like DNVs) in
Pending.received(,DataReply), consolidate routes.terminate() calls into a function on
RequestState, improve some toString()s, change exactly where we terminate the routing
some places. Reindenting, code restyling
Index: AbstractSelectorLoop.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/transport/AbstractSelectorLoop.java,v
retrieving revision 1.57.2.9
retrieving revision 1.57.2.10
diff -u -r1.57.2.9 -r1.57.2.10
--- AbstractSelectorLoop.java 29 Aug 2003 16:42:30 -0000 1.57.2.9
+++ AbstractSelectorLoop.java 29 Aug 2003 18:58:06 -0000 1.57.2.10
@@ -700,26 +700,17 @@
}
public void queueClose(SocketChannel chan) {
- if(!chan.isConnected()) return;
- if(!chan.isOpen()) return;
- Connection c = tcpConnection.getConnectionForSocket(chan.socket());
- if(c == null) {
- if(!chan.isConnected()) return;
- if(!chan.isOpen()) return;
- throw new IllegalArgumentException("Fed socket not connected
to a tcpConnection!: "+chan);
- }
- if (closeUniqueness.containsKey(c)) return;
- queueClose(new ClosePair(c, null, chan));
+ queueClose(chan, null);
}
public void queueClose(SocketChannel chan, NIOCallback nc) {
- if(!chan.isConnected()) return;
- if(!chan.isOpen()) return;
- Connection c = tcpConnection.getConnectionForSocket(chan.socket());
+ if(chan == null) return;
+ Socket sock = chan.socket();
+ if(sock == null) return;
+ Connection c = tcpConnection.getConnectionForSocket(sock);
if(c == null) {
- if(!chan.isConnected()) return;
- if(!chan.isOpen()) return;
- throw new IllegalArgumentException("Fed socket not connected
to a tcpConnection!: "+chan+","+nc);
+ throw new IllegalArgumentException("Fed socket not connected "+
+
"to a tcpConnection!: "+chan);
}
if (closeUniqueness.containsKey(c)) return;
queueClose(new ClosePair(c,nc,chan));
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs