Commit fee094cf authored by Florian Fittkau's avatar Florian Fittkau

minor

parent 171103a7
......@@ -58,7 +58,7 @@ class TCPReaderOneClient extends Thread {
private IRecord[] outputBuffer = new IRecord[Constants.TCP_READER_OUTPUT_BUFFER_SIZE];
private int outputBufferIndex = 0;
private String remoteAddress = "";
private final String remoteAddress = "";
private Trace currentlyOpenTrace;
......@@ -72,6 +72,7 @@ class TCPReaderOneClient extends Thread {
public void run() {
final ByteBuffer buffer = ByteBuffer.allocateDirect(16 * 1024 * 1024);
try {
String remoteAddress = "";
if (socketChannel.isConnected()) {
remoteAddress = ((InetSocketAddress) socketChannel.getRemoteAddress())
.getHostName();
......@@ -80,12 +81,13 @@ class TCPReaderOneClient extends Thread {
RemoteConfigurationServlet.getConnectedChildren().add(remoteAddress);
sendAdaptiveMonitoringList();
// sendAdaptiveMonitoringList();
while ((socketChannel.read(buffer)) != -1) {
buffer.flip();
messagesfromByteArray(buffer);
}
LOG.info("Client " + remoteAddress + " disconnected.");
} catch (final IOException ex) {
RemoteConfigurationServlet.getConnectedChildren().remove(remoteAddress);
LOG.info("Error in read() " + ex.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment