Update of /cvsroot/freenet/freenet/src/freenet/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv7096/src/freenet/transport
Modified Files:
AbstractSelectorLoop.java
Log Message:
6246: minor bugfix. logging.
Index: AbstractSelectorLoop.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/transport/AbstractSelectorLoop.java,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -w -r1.80 -r1.81
--- AbstractSelectorLoop.java 14 Oct 2003 23:59:01 -0000 1.80
+++ AbstractSelectorLoop.java 15 Oct 2003 00:48:37 -0000 1.81
@@ -314,12 +314,19 @@
while(i.hasNext()) {
SelectionKey curKey = (SelectionKey)i.next();
if(curKey == null) continue;
- if
(curKey.attachment().equals(current.attachment)){
+ if(!curKey.isValid()) continue;
+ Object attachment = curKey.attachment();
+ if(attachment == null) {
+ if(logDebug)
+ Core.logger.log(this, "Key
"+curKey+" has null "+
+
"attachment unregistering "+
+
current, Logger.ERROR);
+ curKey.cancel();
+ } else if
(attachment.equals(current.attachment)) {
curKey.cancel();
break;
}
}
-
}
if (current.attachment!=null)
try{
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs