r26633 - in trunk/freenet/src/freenet: io/comm node

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: j16sdiz
Date: 2009-04-08 05:02:45 +0000 (Wed, 08 Apr 2009)
New Revision: 26633

Modified:
   trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java
   trunk/freenet/src/freenet/node/NodeCrypto.java
Log:
Always close socket in UdpSocketHandler.close()

The old close(false) are marked as "not implemented"
anyway, and no body is using it.

Modified: trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java	2009-04-08 00:55:26 UTC (rev 26632)
+++ trunk/freenet/src/freenet/io/comm/UdpSocketHandler.java	2009-04-08 05:02:45 UTC (rev 26633)
@@ -390,7 +390,7 @@
 		}
 	}
 
-    public void close(boolean exit) {
+    public void close() {
     	Logger.normal(this, "Closing.", new Exception("error"));
 		synchronized (this) {
 			_active = false;
@@ -403,12 +403,7 @@
 				}
 			}
 		}
-		if (exit) {
-			_sock.close();
-		} else {
-		    Logger.fatal(this, 10, "Not implemented: close(false)");
-			//Updater.saveResource(_sock);
-		}
+		_sock.close();
 		tracker.storeData(node.bootID, node.getNodeDir(), listenPort);
 	}
     

Modified: trunk/freenet/src/freenet/node/NodeCrypto.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeCrypto.java	2009-04-08 00:55:26 UTC (rev 26632)
+++ trunk/freenet/src/freenet/node/NodeCrypto.java	2009-04-08 05:02:45 UTC (rev 26633)
@@ -12,11 +12,12 @@
 import java.util.ArrayList;
 import java.util.zip.DeflaterOutputStream;
 
+import net.i2p.util.NativeBigInteger;
+
 import com.db4o.ObjectContainer;
 import com.db4o.ObjectSet;
 import com.db4o.query.Predicate;
 
-import net.i2p.util.NativeBigInteger;
 import freenet.crypt.BlockCipher;
 import freenet.crypt.DSA;
 import freenet.crypt.DSAGroup;
@@ -475,7 +476,7 @@
 
 	public void stop() {
 		config.stopping(this);
-		socket.close(true);
+		socket.close();
 	}
 
 	public PeerNode[] getPeerNodes() {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.