Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* Telnet to this socket to get a "command prompt".
*
*
* @author jmfee
*/
public class AdminSocketServer extends DefaultConfigurable implements
Expand Down Expand Up @@ -74,7 +74,7 @@ public void shutdown() throws Exception {

/**
* Process a line of input.
*
*
* @param line
* input
* @param out
Expand Down Expand Up @@ -144,10 +144,11 @@ public void onSocket(Socket socket) {
in = socket.getInputStream();
out = socket.getOutputStream();

BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line = null;
while ((line = br.readLine()) != null) {
processLine(line, out);
try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) {
String line = null;
while ((line = br.readLine()) != null) {
processLine(line, out);
}
}
} catch (Exception ex) {
LOGGER.log(Level.WARNING, "[" + getName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down
Loading