diff -r 6fceb66e1ad7 -r 2fdc9cc89502 org/sonews/daemon/Connections.java --- a/org/sonews/daemon/Connections.java Fri Jun 26 16:48:50 2009 +0200 +++ b/org/sonews/daemon/Connections.java Wed Jul 22 14:04:05 2009 +0200 @@ -18,6 +18,7 @@ package org.sonews.daemon; +import org.sonews.config.Config; import org.sonews.util.Log; import java.io.IOException; import java.net.InetSocketAddress; @@ -37,7 +38,7 @@ * @author Christian Lins * @since sonews/0.5.0 */ -final class Connections extends AbstractDaemon +public final class Connections extends AbstractDaemon { private static final Connections instance = new Connections(); @@ -70,7 +71,7 @@ synchronized(this.connections) { this.connections.add(conn); - this.connByChannel.put(conn.getChannel(), conn); + this.connByChannel.put(conn.getSocketChannel(), conn); } } @@ -95,9 +96,9 @@ for(NNTPConnection conn : this.connections) { assert conn != null; - assert conn.getChannel() != null; + assert conn.getSocketChannel() != null; - Socket socket = conn.getChannel().socket(); + Socket socket = conn.getSocketChannel().socket(); if(socket != null) { InetSocketAddress sockAddr = (InetSocketAddress)socket.getRemoteSocketAddress(); @@ -123,7 +124,7 @@ { while(isRunning()) { - int timeoutMillis = 1000 * Config.getInstance().get(Config.TIMEOUT, 180); + int timeoutMillis = 1000 * Config.inst().get(Config.TIMEOUT, 180); synchronized (this.connections) { @@ -139,7 +140,7 @@ iter.remove(); // Close and remove the channel - SocketChannel channel = conn.getChannel(); + SocketChannel channel = conn.getSocketChannel(); connByChannel.remove(channel); try